[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:05:54 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=f9611ae
The following commit has been merged in the master branch:
commit f9611ae85353f70f5c4d1c8cf39757ed4ca86077
Author: Martin Klapetek <mklapetek at kde.org>
Date: Wed Aug 6 13:06:19 2014 +0200
Port KIcon to QIcon
Also changes ProfileItem::icon() to return a QIcon rather than QIcon&,
there's no reason to return a pointer to an icon
---
src/KCMTelepathyAccounts/account-edit-widget.cpp | 4 ++--
src/KCMTelepathyAccounts/feedback-widget.cpp | 2 +-
src/KCMTelepathyAccounts/profile-item.cpp | 17 +++++------------
src/KCMTelepathyAccounts/profile-item.h | 6 +++---
src/KCMTelepathyAccounts/profile-list-model.cpp | 2 +-
src/KCMTelepathyAccounts/validated-line-edit.cpp | 2 +-
6 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/src/KCMTelepathyAccounts/account-edit-widget.cpp b/src/KCMTelepathyAccounts/account-edit-widget.cpp
index a424ba8..e885ad0 100644
--- a/src/KCMTelepathyAccounts/account-edit-widget.cpp
+++ b/src/KCMTelepathyAccounts/account-edit-widget.cpp
@@ -92,7 +92,7 @@ AccountEditWidget::AccountEditWidget(const Tp::ProfilePtr &profile,
feedback,
SLOT(setMessage(QString,QString,KMessageWidget::MessageType)));
- d->ui->advancedButton->setIcon(KIcon(QLatin1String("configure")));
+ d->ui->advancedButton->setIcon(QIcon::fromTheme(QLatin1String("configure")));
//FIXME: Dictionary should not be needed anymore when distros ship profiles
QString localizedName = Dictionary::instance()->string(profile->name());
if (localizedName.isEmpty()) {
@@ -100,7 +100,7 @@ AccountEditWidget::AccountEditWidget(const Tp::ProfilePtr &profile,
}
d->ui->titleLabel->setText(localizedName);
d->ui->iconLabel->setText(QString());
- d->ui->iconLabel->setPixmap(KIcon(profile->iconName()).pixmap(32));
+ d->ui->iconLabel->setPixmap(QIcon::fromTheme(profile->iconName()).pixmap(32));
if (connectOnAddFlag == doConnectOnAdd) {
d->connectOnAdd = new QCheckBox(i18n("Connect when wizard is finished"), this);
diff --git a/src/KCMTelepathyAccounts/feedback-widget.cpp b/src/KCMTelepathyAccounts/feedback-widget.cpp
index 45a2ef2..d602207 100644
--- a/src/KCMTelepathyAccounts/feedback-widget.cpp
+++ b/src/KCMTelepathyAccounts/feedback-widget.cpp
@@ -24,7 +24,6 @@
#include "feedback-widget.h"
#include <KLocale>
-#include <KIcon>
#include <KPushButton>
#include <KColorScheme>
@@ -35,6 +34,7 @@
#include <QtGui/QPaintEvent>
#include <QtGui/QPainter>
#include <QtCore/QTimer>
+#include <QIcon>
FeedbackWidget::FeedbackWidget(QWidget *parent)
: KMessageWidget(parent)
diff --git a/src/KCMTelepathyAccounts/profile-item.cpp b/src/KCMTelepathyAccounts/profile-item.cpp
index ee3b63d..b9dec00 100644
--- a/src/KCMTelepathyAccounts/profile-item.cpp
+++ b/src/KCMTelepathyAccounts/profile-item.cpp
@@ -25,12 +25,11 @@
#include "dictionary.h"
#include <TelepathyQt/Profile>
-#include <KIcon>
+#include <QIcon>
ProfileItem::ProfileItem(const Tp::ProfilePtr &profile, QObject *parent)
: QObject(parent),
- m_profile(profile),
- m_icon(0)
+ m_profile(profile)
{
//FIXME: Dictionary should not be needed anymore when distros ship profiles
m_localizedName = Dictionary::instance()->string(profile->name());
@@ -43,7 +42,6 @@ ProfileItem::ProfileItem(const Tp::ProfilePtr &profile, QObject *parent)
ProfileItem::~ProfileItem()
{
- delete m_icon;
}
QString ProfileItem::serviceName() const
@@ -81,19 +79,14 @@ Tp::ProfilePtr ProfileItem::profile() const
return m_profile;
}
-const KIcon& ProfileItem::icon() const
+const QIcon ProfileItem::icon() const
{
- Q_ASSERT(m_icon != 0);
-
- return *m_icon;
+ return m_icon;
}
void ProfileItem::generateIcon()
{
- QString iconPath = profile()->iconName();
-
- delete m_icon;
- m_icon = new KIcon(iconPath);
+ m_icon = QIcon::fromTheme(profile()->iconName());
}
#include "profile-item.moc"
diff --git a/src/KCMTelepathyAccounts/profile-item.h b/src/KCMTelepathyAccounts/profile-item.h
index d1fabc2..00be545 100644
--- a/src/KCMTelepathyAccounts/profile-item.h
+++ b/src/KCMTelepathyAccounts/profile-item.h
@@ -25,11 +25,11 @@
#include "kcm_telepathy_accounts_export.h"
#include <QtCore/QObject>
+#include <QIcon>
#include <TelepathyQt/Profile>
class ProfileListModel;
-class KIcon;
class KCM_TELEPATHY_ACCOUNTS_EXPORT ProfileItem : public QObject
{
@@ -47,14 +47,14 @@ public:
QString cmName() const;
QString protocolName() const;
Tp::ProfilePtr profile() const;
- const KIcon& icon() const;
+ const QIcon icon() const;
private:
void generateIcon();
Tp::ProfilePtr m_profile;
QString m_localizedName;
- KIcon* m_icon;
+ QIcon m_icon;
};
diff --git a/src/KCMTelepathyAccounts/profile-list-model.cpp b/src/KCMTelepathyAccounts/profile-list-model.cpp
index 6fbb963..6c43e8a 100644
--- a/src/KCMTelepathyAccounts/profile-list-model.cpp
+++ b/src/KCMTelepathyAccounts/profile-list-model.cpp
@@ -29,8 +29,8 @@
#include <TelepathyQt/PendingStringList>
#include <TelepathyQt/PendingComposite>
-#include <KIcon>
#include <QDebug>
+#include <QIcon>
ProfileListModel::ProfileListModel(QObject *parent)
: QAbstractListModel(parent)
diff --git a/src/KCMTelepathyAccounts/validated-line-edit.cpp b/src/KCMTelepathyAccounts/validated-line-edit.cpp
index f84f9b6..14afe2d 100644
--- a/src/KCMTelepathyAccounts/validated-line-edit.cpp
+++ b/src/KCMTelepathyAccounts/validated-line-edit.cpp
@@ -22,7 +22,6 @@
#include "parameter-edit-model.h"
-#include <KIcon>
#include <KLineEdit>
#include <KLocale>
#include <KIconLoader>
@@ -34,6 +33,7 @@
#include <QtGui/QPainter>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QPersistentModelIndex>
+#include <QIcon>
class ValidationIconWidget : public QWidget
{
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list