summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-24 13:50:18 +0100
committerPali Roh├ír <[email protected]>2017-12-22 09:10:24 +0100
commit41af8033e01da6287620a7365349b35da6db8a06 (patch)
tree1fe2b76c6419c9d40b16447c86d6983a7706f225
parentc27477bcc8d52f2a37d3ebe2b645c147c82de676 (diff)
Port to QIcon
-rw-r--r--kopete/config/avdevice/IdGuiElements.cpp4
-rw-r--r--kopete/config/avdevice/IdGuiElements.h4
-rw-r--r--plugins/contactnotes/contactnotesplugin.cpp4
-rw-r--r--plugins/latex/latexguiclient.cpp4
-rw-r--r--plugins/otr/otrguiclient.cpp18
-rw-r--r--plugins/privacy/privacyguiclient.cpp6
6 files changed, 20 insertions, 20 deletions
diff --git a/kopete/config/avdevice/IdGuiElements.cpp b/kopete/config/avdevice/IdGuiElements.cpp
index 0de5002..8c11c2a 100644
--- a/kopete/config/avdevice/IdGuiElements.cpp
+++ b/kopete/config/avdevice/IdGuiElements.cpp
@@ -22,13 +22,13 @@ IdPushButton::IdPushButton(unsigned int id, QWidget *parent) : KPushButton(paren
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
-IdPushButton::IdPushButton(unsigned int id, const QString text, QWidget *parent) : KPushButton(text, parent)
+IdPushButton::IdPushButton(unsigned int id, const QString &text, QWidget *parent) : KPushButton(text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
}
-IdPushButton::IdPushButton(unsigned int id, const KIcon icon, const QString text, QWidget *parent) : KPushButton(icon, text, parent)
+IdPushButton::IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent) : KPushButton(icon, text, parent)
{
_id = id;
connect(this, SIGNAL(pressed()), this, SLOT(emitPressed()));
diff --git a/kopete/config/avdevice/IdGuiElements.h b/kopete/config/avdevice/IdGuiElements.h
index c1a3cbf..546a874 100644
--- a/kopete/config/avdevice/IdGuiElements.h
+++ b/kopete/config/avdevice/IdGuiElements.h
@@ -29,8 +29,8 @@ class IdPushButton : public KPushButton
Q_OBJECT
public:
IdPushButton(unsigned int id, QWidget *parent = nullptr);
- IdPushButton(unsigned int id, const QString text, QWidget *parent = nullptr);
- IdPushButton(unsigned int id, const KIcon icon, const QString text, QWidget *parent = nullptr);
+ IdPushButton(unsigned int id, const QString &text, QWidget *parent = nullptr);
+ IdPushButton(unsigned int id, const KIcon &icon, const QString &text, QWidget *parent = nullptr);
IdPushButton(unsigned int id, KGuiItem item, QWidget *parent = nullptr);
private:
unsigned int _id;
diff --git a/plugins/contactnotes/contactnotesplugin.cpp b/plugins/contactnotes/contactnotesplugin.cpp
index 1b77693..cb7ca5f 100644
--- a/plugins/contactnotes/contactnotesplugin.cpp
+++ b/plugins/contactnotes/contactnotesplugin.cpp
@@ -20,7 +20,7 @@
#include <QAction>
#include <kdebug.h>
#include <kgenericfactory.h>
-#include <kicon.h>
+#include <qicon.h>
#include "kopetemetacontact.h"
#include "kopetecontactlist.h"
@@ -41,7 +41,7 @@ ContactNotesPlugin::ContactNotesPlugin(QObject *parent, const QVariantList & /*
pluginStatic_ = this;
}
- QAction *m_actionEdit = new QAction(KIcon(QStringLiteral("user-identity")), i18n("&Notes"), this);
+ QAction *m_actionEdit = new QAction(QIcon::fromTheme(QStringLiteral("user-identity")), i18n("&Notes"), this);
actionCollection()->addAction(QStringLiteral("editContactNotes"), m_actionEdit);
connect(m_actionEdit, SIGNAL(triggered(bool)), this, SLOT(slotEditInfo()));
diff --git a/plugins/latex/latexguiclient.cpp b/plugins/latex/latexguiclient.cpp
index 278818c..c32750c 100644
--- a/plugins/latex/latexguiclient.cpp
+++ b/plugins/latex/latexguiclient.cpp
@@ -23,7 +23,7 @@
#include <KLocalizedString>
#include <QKeySequence>
#include <kmessagebox.h>
-#include <kicon.h>
+#include <qicon.h>
#include <qimage.h>
#include <qregexp.h>
@@ -43,7 +43,7 @@ LatexGUIClient::LatexGUIClient(Kopete::ChatSession *parent)
m_manager = parent;
- QAction *previewAction = new QAction(KIcon(QStringLiteral("latex")), i18n("Preview Latex Images"), this);
+ QAction *previewAction = new QAction(QIcon::fromTheme(QStringLiteral("latex")), i18n("Preview Latex Images"), this);
actionCollection()->addAction(QStringLiteral("latexPreview"), previewAction);
previewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
connect(previewAction, SIGNAL(triggered(bool)), this, SLOT(slotPreview()));
diff --git a/plugins/otr/otrguiclient.cpp b/plugins/otr/otrguiclient.cpp
index e41aa53..1e53227 100644
--- a/plugins/otr/otrguiclient.cpp
+++ b/plugins/otr/otrguiclient.cpp
@@ -31,7 +31,7 @@
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <kicon.h>
+#include <qicon.h>
#include <kactioncollection.h>
/**
@@ -58,19 +58,19 @@ OtrGUIClient::OtrGUIClient(Kopete::ChatSession *parent)
m_manager = parent;
- otrActionMenu = new KActionMenu(KIcon(QStringLiteral("document-decrypt")), i18n("OTR Encryption"), actionCollection());
+ otrActionMenu = new KActionMenu(QIcon::fromTheme(QStringLiteral("document-decrypt")), i18n("OTR Encryption"), actionCollection());
otrActionMenu->setDelayed(false);
actionCollection()->addAction(QStringLiteral("otr_settings"), otrActionMenu);
- actionEnableOtr = new KAction(KIcon(QStringLiteral("object-locked")), i18n("Start OTR Session"), this);
+ actionEnableOtr = new KAction(QIcon::fromTheme(QStringLiteral("object-locked")), i18n("Start OTR Session"), this);
actionCollection()->addAction(QStringLiteral("enableOtr"), actionEnableOtr);
connect(actionEnableOtr, SIGNAL(triggered(bool)), this, SLOT(slotEnableOtr()));
- actionDisableOtr = new KAction(KIcon(QStringLiteral("object-unlocked")), i18n("End OTR Session"), this);
+ actionDisableOtr = new KAction(QIcon::fromTheme(QStringLiteral("object-unlocked")), i18n("End OTR Session"), this);
actionCollection()->addAction(QStringLiteral("disableOtr"), actionDisableOtr);
connect(actionDisableOtr, SIGNAL(triggered(bool)), this, SLOT(slotDisableOtr()));
- actionVerifyFingerprint = new KAction(KIcon(QStringLiteral("application-pgp-signature")), i18n("Authenticate Contact"), this);
+ actionVerifyFingerprint = new KAction(QIcon::fromTheme(QStringLiteral("application-pgp-signature")), i18n("Authenticate Contact"), this);
actionCollection()->addAction(QStringLiteral("verifyFingerprint"), actionVerifyFingerprint);
connect(actionVerifyFingerprint, SIGNAL(triggered(bool)), this, SLOT(slotVerifyFingerprint()));
@@ -112,25 +112,25 @@ void OtrGUIClient::encryptionEnabled(Kopete::ChatSession *session, int state)
if (session == m_manager) {
switch (state) {
case 0:
- otrActionMenu->setIcon(KIcon(QStringLiteral("object-unlocked")));
+ otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-unlocked")));
actionEnableOtr->setText(i18n("Start OTR Session"));
actionDisableOtr->setEnabled(false);
actionVerifyFingerprint->setEnabled(false);
break;
case 1:
- otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-unverified")));
+ otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-unverified")));
actionEnableOtr->setText(i18n("Refresh OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(true);
break;
case 2:
- otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-verified")));
+ otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-verified")));
actionEnableOtr->setText(i18n("Refresh OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(true);
break;
case 3:
- otrActionMenu->setIcon(KIcon(QStringLiteral("object-locked-finished")));
+ otrActionMenu->setIcon(QIcon::fromTheme(QStringLiteral("object-locked-finished")));
actionEnableOtr->setText(i18n("Start OTR Session"));
actionDisableOtr->setEnabled(true);
actionVerifyFingerprint->setEnabled(false);
diff --git a/plugins/privacy/privacyguiclient.cpp b/plugins/privacy/privacyguiclient.cpp
index 0a5419a..9037ac3 100644
--- a/plugins/privacy/privacyguiclient.cpp
+++ b/plugins/privacy/privacyguiclient.cpp
@@ -24,7 +24,7 @@
#include <kstandardaction.h>
#include <KLocalizedString>
#include <kgenericfactory.h>
-#include <kicon.h>
+#include <qicon.h>
#include <QList>
#include <kactioncollection.h>
@@ -46,10 +46,10 @@ PrivacyGUIClient::PrivacyGUIClient(Kopete::ChatSession *parent)
QList<Kopete::Contact *> mb = m_manager->members();
- actionAddToWhiteList = new QAction(KIcon(QStringLiteral("privacy_whitelist")), i18n("Add to WhiteList"), this);
+ actionAddToWhiteList = new QAction(QIcon::fromTheme(QStringLiteral("privacy_whitelist")), i18n("Add to WhiteList"), this);
actionCollection()->addAction(QStringLiteral("addToWhiteList"), actionAddToWhiteList);
connect(actionAddToWhiteList, SIGNAL(triggered(bool)), this, SLOT(slotAddToWhiteList()));
- actionAddToBlackList = new QAction(KIcon(QStringLiteral("privacy_blacklist")), i18n("Add to BlackList"), this);
+ actionAddToBlackList = new QAction(QIcon::fromTheme(QStringLiteral("privacy_blacklist")), i18n("Add to BlackList"), this);
actionCollection()->addAction(QStringLiteral("addToBlackList"), actionAddToBlackList);
connect(actionAddToBlackList, SIGNAL(triggered(bool)), this, SLOT(slotAddToBlackList()));
actionAddToWhiteList->setEnabled(true);