Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5154ce3c authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port to QIcon

parent 8630f98d
......@@ -35,7 +35,7 @@
#include <QAction>
#include <klocalizedstring.h>
#include <kaboutdata.h>
#include <kicon.h>
#include <qicon.h>
#include <kiconloader.h>
#include <kmessagebox.h>
......@@ -79,9 +79,9 @@ CryptographyGUIClient::CryptographyGUIClient (Kopete::ChatSession *parent)
}
}
m_encAction = new KToggleAction(KIcon("document-encrypt"), i18nc("@action toggle action", "Encrypt Messages"), this);
m_encAction = new KToggleAction(QIcon::fromTheme("document-encrypt"), i18nc("@action toggle action", "Encrypt Messages"), this);
actionCollection()->addAction("encryptionToggle", m_encAction);
m_signAction = new KToggleAction(KIcon("document-sign"), i18nc("@action toggle action", "Sign Messages"), this);
m_signAction = new KToggleAction(QIcon::fromTheme("document-sign"), i18nc("@action toggle action", "Sign Messages"), this);
actionCollection()->addAction("signToggle", m_signAction);
m_exportAction = new QAction(i18nc("@action toggle action", "Export Contacts' Keys to Address Book"), this);
actionCollection()->addAction("export", m_exportAction);
......
......@@ -90,13 +90,13 @@ CryptographyPlugin::CryptographyPlugin (QObject *parent, const QVariantList & /*
SLOT(slotOutgoingMessage(Kopete::Message&)));
// actions in the contact list
QAction *action = new QAction(KIcon("document-encrypt"), i18nc("@action", "&Select Public Key..."), this);
QAction *action = new QAction(QIcon::fromTheme("document-encrypt"), i18nc("@action", "&Select Public Key..."), this);
actionCollection()->addAction("contactSelectKey", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(slotSelectContactKey()));
connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)), action, SLOT(setEnabled(bool)));
action->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count() == 1);
action = new QAction(KIcon("document-export-key"), i18nc("@action", "&Export Public Keys To Address Book..."), this);
action = new QAction(QIcon::fromTheme("document-export-key"), i18nc("@action", "&Export Public Keys To Address Book..."), this);
actionCollection()->addAction("exportKey", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(slotExportSelectedMetaContactKeys()));
connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)), action, SLOT(setEnabled(bool)));
......@@ -437,7 +437,7 @@ QString CryptographyPlugin::kabcKeySelector(QString displayName, QString address
ui.label->setText(i18nc("@info", "Cryptography plugin has found multiple encryption keys for %1 (%2) in your KDE address book. To use one of these keys, select it and choose OK.",
displayName, addresseeName));
for (int i = 0; i < keys.count(); i++) {
ui.keyList->addItem(new QListWidgetItem(KIcon("application-pgp-keys"), keys[i].right(8).prepend("0x"), ui.keyList));
ui.keyList->addItem(new QListWidgetItem(QIcon::fromTheme("application-pgp-keys"), keys[i].right(8).prepend("0x"), ui.keyList));
}
ui.keyList->addItems(keys);
QString ret;
......
......@@ -63,7 +63,7 @@ ExportKeys::ExportKeys (QList<Kopete::MetaContact *> mcs, QWidget *parent)
// now we create the ListWidgetItem
key = key.right(8).prepend("0x");
key = key + ' ' + mc->displayName() + " (" + addressee.formattedName() + ')';
QListWidgetItem *tmpItem = new QListWidgetItem(KIcon("document-export-key"), key, mUi->keyList);
QListWidgetItem *tmpItem = new QListWidgetItem(QIcon::fromTheme("document-export-key"), key, mUi->keyList);
tmpItem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
tmpItem->setCheckState(Qt::Checked);
mUi->keyList->addItem(tmpItem);
......
......@@ -184,7 +184,7 @@ QList<QAction *> *JabberContact::customContextMenuActions ()
#define QAction(status, text, name, slot) \
{ QAction *tmp = new QAction(this); \
tmp->setIcon( KIcon(QIcon((status).iconFor(this)))); \
tmp->setIcon( QIcon((status).iconFor(this))); \
tmp->setText( text ); \
connect(tmp, SIGNAL(triggered(bool)), (slot));\
actionSetAvailability->addAction(tmp); }
......
......@@ -294,7 +294,7 @@ void AIMAccount::fillActionMenu( KActionMenu *actionMenu )
actionMenu->addAction( mEditInfoAction );
Oscar::Presence pres( presence().type(), presence().flags() | Oscar::Presence::Invisible );
mActionInvisible->setIcon( KIcon( protocol()->statusManager()->onlineStatusOf( pres ).iconFor( this ) ) );
mActionInvisible->setIcon( QIcon( protocol()->statusManager()->onlineStatusOf( pres ).iconFor( this ) ) );
mActionInvisible->setChecked( (presence().flags() & Oscar::Presence::Invisible) == Oscar::Presence::Invisible );
actionMenu->addAction( mActionInvisible );
}
......
......@@ -177,7 +177,7 @@ void ICQAccount::fillActionMenu( KActionMenu *actionMenu )
Oscar::Presence pres( presence().type(), presence().flags() | Oscar::Presence::Invisible );
pres.setXtrazStatus( presence().xtrazStatus() );
mActionInvisible->setIcon( KIcon( protocol()->statusManager()->onlineStatusOf( pres ).iconFor( this ) ) );
mActionInvisible->setIcon( QIcon( protocol()->statusManager()->onlineStatusOf( pres ).iconFor( this ) ) );
mActionInvisible->setChecked( (presence().flags() & Oscar::Presence::Invisible) == Oscar::Presence::Invisible );
actionMenu->addAction( mActionInvisible );
......
......@@ -167,13 +167,13 @@ void WPAccount::fillActionMenu(KActionMenu *actionMenu)
actionMenu->menu()->addAction(QIcon(myself()->onlineStatus().iconFor(this)), i18n("WinPopup (%1)", accountId()));
if (mProtocol) {
QAction *goOnline = new QAction(KIcon(QIcon(mProtocol->WPOnline.iconFor(this))), i18n("Online"), this);
QAction *goOnline = new QAction(QIcon(mProtocol->WPOnline.iconFor(this)), i18n("Online"), this);
//, "actionGoAvailable" );
QObject::connect(goOnline, SIGNAL(triggered(bool)), this, SLOT(connect()));
goOnline->setEnabled(isConnected() && isAway());
actionMenu->addAction(goOnline);
QAction *goAway = new QAction(KIcon(QIcon(mProtocol->WPAway.iconFor(this))), i18n("Away"), this);
QAction *goAway = new QAction(QIcon(mProtocol->WPAway.iconFor(this)), i18n("Away"), this);
//, "actionGoAway" );
QObject::connect(goAway, SIGNAL(triggered(bool)), this, SLOT(goAway()));
goAway->setEnabled(isConnected() && !isAway());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment