Commit 5d50ae81 authored by R. Harish Navnit's avatar R. Harish Navnit Committed by Pali Rohár

Port away from KIcon

parent 906d22f5
......@@ -78,7 +78,7 @@
#include <kstandardaction.h>
#include <kiconloader.h>
#include <kcodecs.h>
#include <kicon.h>
#include <QIcon>
// Kopete includes
#include "kopetecontact.h"
......@@ -274,7 +274,7 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent )
d->saveAction = KStandardAction::saveAs( this, SLOT(save()), actionCollection() );
d->printAction = KStandardAction::print( this, SLOT(print()),actionCollection() );
d->closeAction = KStandardAction::close( this, SLOT(slotCloseView()),actionCollection() );
d->copyURLAction = new QAction( KIcon("edit-copy"), i18n( "Copy Link Address" ), actionCollection() );
d->copyURLAction = new QAction( QIcon::fromTheme("edit-copy"), i18n( "Copy Link Address" ), actionCollection() );
actionCollection()->addAction( "editcopy", d->copyURLAction );
connect( d->copyURLAction, SIGNAL(triggered(bool)), this, SLOT(slotCopyURL()) );
......
......@@ -37,7 +37,7 @@
#include <kfontsizeaction.h>
#include <kglobalsettings.h>
#include <kcolorscheme.h>
#include <kicon.h>
#include <QIcon>
#include <kparts/genericfactory.h>
#include <kstandardaction.h>
#include <ktoggleaction.h>
......
......@@ -44,7 +44,7 @@
#include <kmenubar.h>
#include <kconfig.h>
#include <kmenu.h>
#include <kicon.h>
#include <QIcon>
#include <kiconloader.h>
#include <kdebug.h>
#include <kwindowsystem.h>
......@@ -364,7 +364,7 @@ void KopeteChatWindow::initActions(void)
createStandardStatusBarAction();
chatSend = new QAction( KIcon("mail-send"), i18n( "&Send Message" ), coll );
chatSend = new QAction( QIcon::fromTheme("mail-send"), i18n( "&Send Message" ), coll );
//Recuperate the qAction for later
sendMessage = coll->addAction( "chat_send", chatSend );
//Set up change signal in case the user changer the shortcut later
......@@ -378,7 +378,7 @@ void KopeteChatWindow::initActions(void)
chatSend->setShortcut( chatSendShortcut );
chatSend->setEnabled( false );
chatSendFile = new QAction( KIcon("mail-attachment"), i18n( "Send File..." ), coll );
chatSendFile = new QAction( QIcon::fromTheme("mail-attachment"), i18n( "Send File..." ), coll );
coll->addAction( "chat_send_file", chatSendFile );
connect( chatSendFile, SIGNAL(triggered(bool)), SLOT(slotSendFile()) );
chatSendFile->setEnabled( false );
......@@ -415,17 +415,17 @@ void KopeteChatWindow::initActions(void)
coll->addAction( "nick_complete", nickComplete );
nickComplete->setShortcut( QKeySequence( Qt::Key_Tab ) );
tabDetach = new QAction( KIcon("tab-detach"), i18n( "&Detach Chat" ), coll );
tabDetach = new QAction( QIcon::fromTheme("tab-detach"), i18n( "&Detach Chat" ), coll );
coll->addAction( "tabs_detach", tabDetach );
tabDetach->setEnabled( false );
connect( tabDetach, SIGNAL(triggered(bool)), this, SLOT(slotDetachChat()));
tabCloseAllOthers = new QAction( KIcon("tab-close"), i18n( "Close &All But This Tab" ), coll );
tabCloseAllOthers = new QAction( QIcon::fromTheme("tab-close"), i18n( "Close &All But This Tab" ), coll );
coll->addAction( "tabs_close_others", tabCloseAllOthers );
tabCloseAllOthers->setEnabled( true );
connect( tabCloseAllOthers, SIGNAL(triggered(bool)), this, SLOT(slotCloseAllOtherTabs()));
actionDetachMenu = new KActionMenu( KIcon("tab-detach"), i18n( "&Move Tab to Window" ), coll );
actionDetachMenu = new KActionMenu( QIcon::fromTheme("tab-detach"), i18n( "&Move Tab to Window" ), coll );
coll->addAction( "tabs_detachmove", actionDetachMenu );
actionDetachMenu->setDelayed( false );
......@@ -470,7 +470,7 @@ void KopeteChatWindow::initActions(void)
QAction *toggleParticipantsAction = m_participantsWidget->toggleViewAction( );
toggleParticipantsAction->setText( i18n( "Show Participants" ) );
toggleParticipantsAction->setIconText(i18n( "Participants" ));
toggleParticipantsAction->setIcon(KIcon( "system-users" ) );
toggleParticipantsAction->setIcon(QIcon::fromTheme( "system-users" ) );
coll->addAction ( "show_participants_widget", toggleParticipantsAction );
actionSmileyMenu = new KopeteEmoticonAction( coll );
......@@ -708,7 +708,7 @@ void KopeteChatWindow::addTab( ChatView *view )
c=contact;
}
QIcon pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) :
KIcon( view->msgManager()->protocol()->pluginIcon() );
QIcon::fromTheme( view->msgManager()->protocol()->pluginIcon() );
view->setParent( m_tabBar );
view->setWindowFlags( 0 );
......@@ -1031,12 +1031,12 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view )
if ( view == m_activeView )
{
setWindowIcon( c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c ) :
KIcon(view->msgManager()->protocol()->pluginIcon()));
QIcon::fromTheme(view->msgManager()->protocol()->pluginIcon()));
}
if ( m_tabBar )
m_tabBar->setTabIcon(m_tabBar->indexOf( view ), c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c ) :
KIcon( view->msgManager()->protocol()->pluginIcon() ) );
QIcon::fromTheme( view->msgManager()->protocol()->pluginIcon() ) );
}
void KopeteChatWindow::slotChatClosed()
......@@ -1117,7 +1117,7 @@ void KopeteChatWindow::slotPrepareContactMenu(void)
//FIXME: This number should be a config option
if( ++contactCount == 15 && contact != m_them.last() )
{
KActionMenu *moreMenu = new KActionMenu( KIcon("folder-open"), i18n("More..."), this);
KActionMenu *moreMenu = new KActionMenu( QIcon::fromTheme("folder-open"), i18n("More..."), this);
connect ( actionContactMenu->menu(), SIGNAL(aboutToHide()),
moreMenu, SLOT(deleteLater()) );
contactsMenu->addAction( moreMenu );
......
......@@ -55,7 +55,7 @@
#include <kxmlguifactory.h>
#include <kvbox.h>
#include <ktoolbar.h>
#include <kicon.h>
#include <QIcon>
#include <qlabel.h>
#include <qlayout.h>
......@@ -215,7 +215,7 @@ void KopeteEmailWindow::initActions(void)
{
KActionCollection *coll = actionCollection();
d->chatSend = new QAction( KIcon("mail-send"), i18n( "&Send Message" ), this );
d->chatSend = new QAction( QIcon::fromTheme("mail-send"), i18n( "&Send Message" ), this );
coll->addAction( "chat_send", d->chatSend );
//Default to 'Return' for sending messages
d->chatSend->setShortcut( QKeySequence( Qt::Key_Return ) );
......@@ -231,15 +231,15 @@ void KopeteEmailWindow::initActions(void)
// Disable it for now
#if 0
QAction * action;
action = new QAction( KIcon("preferences-desktop-font"), i18n( "&Set Font..." ), coll );
action = new QAction( QIcon::fromTheme("preferences-desktop-font"), i18n( "&Set Font..." ), coll );
coll->addAction( "format_font", action );
connect( action, SIGNAL(triggered(bool)), d->editPart, SLOT(setFont()) );
action = new QAction( KIcon("format-stroke-color"), i18n( "Set Text &Color..." ), coll );
action = new QAction( QIcon::fromTheme("format-stroke-color"), i18n( "Set Text &Color..." ), coll );
coll->addAction( "format_color", action );
connect( action, SIGNAL(triggered()), d->editPart, SLOT(setForegroundColorColor()) );
action = new QAction( KIcon("format-fill-color"), i18n( "Set &Background Color..." ), coll );
action = new QAction( QIcon::fromTheme("format-fill-color"), i18n( "Set &Background Color..." ), coll );
coll->addAction( "format_bgcolor", action );
connect( action, SIGNAL(triggered()), d->editPart, SLOT(setBackgroundColorColor()) );
#endif
......
......@@ -28,7 +28,7 @@
#include <kmenu.h>
#include <ktoolbar.h>
#include <kauthorized.h>
#include <kicon.h>
#include <QIcon>
#include <kemoticons.h>
#include "emoticonselector.h"
......@@ -84,9 +84,9 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent )
setMenu( d->m_popup );
if ( icon.isNull() )
setIcon( KIcon("emoticon") );
setIcon( QIcon::fromTheme("emoticon") );
else
setIcon( KIcon( icon ) );
setIcon( QIcon::fromTheme( icon ) );
setShortcutConfigurable( false );
connect( d->emoticonSelector, SIGNAL(itemSelected(QString)),
......
......@@ -172,7 +172,7 @@ void KopeteRichTextWidget::createActions(KActionCollection *actionCollection)
if (!d->checkSpelling)
{
d->checkSpelling = new KToggleAction(KIcon("tools-check-spelling"), i18n("Automatic Spell Checking"), actionCollection);
d->checkSpelling = new KToggleAction(QIcon::fromTheme("tools-check-spelling"), i18n("Automatic Spell Checking"), actionCollection);
actionCollection->addAction("enable_auto_spell_check", d->checkSpelling);
d->checkSpelling->setChecked(true);
connect(d->checkSpelling, SIGNAL(toggled(bool)), this, SLOT(slotCheckSpellingChanged(bool)));
......@@ -181,7 +181,7 @@ void KopeteRichTextWidget::createActions(KActionCollection *actionCollection)
bool richTextSupport = (getProtocolRichTextSupport() != KopeteRichTextWidget::DisableRichText);
if (!d->toggleRichText && richTextSupport)
{
d->toggleRichText = new KToggleAction(KIcon("draw-freehand"), i18n("Enable &Rich Text"), actionCollection);
d->toggleRichText = new KToggleAction(QIcon::fromTheme("draw-freehand"), i18n("Enable &Rich Text"), actionCollection);
actionCollection->addAction("enable_richtext", d->toggleRichText);
d->toggleRichText->setChecked(isRichTextEnabled());
connect(d->toggleRichText, SIGNAL(toggled(bool)), this, SLOT(setRichTextEnabled(bool)));
......@@ -194,7 +194,7 @@ void KopeteRichTextWidget::createActions(KActionCollection *actionCollection)
if (!d->reset && isRichTextEnabled())
{
d->reset = new QAction(KIcon("format-stroke-color"), i18n("Reset Font And Color"), actionCollection);
d->reset = new QAction(QIcon::fromTheme("format-stroke-color"), i18n("Reset Font And Color"), actionCollection);
actionCollection->addAction("format_font_and_color_reset", d->reset);
connect(d->reset, SIGNAL(triggered(bool)), this, SLOT(slotResetFontAndColor()));
}
......
......@@ -36,7 +36,7 @@
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kicon.h>
#include <QIcon>
#include <QAction>
#include <kmenu.h>
#include <kcolordialog.h>
......@@ -160,7 +160,7 @@ void KopeteAccountConfig::load()
// Insert the item after the previous one
identityItem->setText( 0, i->label() );
identityItem->setIcon( 0, KIcon( i->customIcon()) );
identityItem->setIcon( 0, QIcon::fromTheme( i->customIcon()) );
identityItem->setExpanded( true );
......@@ -546,7 +546,7 @@ void KopeteAccountConfig::configureActions()
{
// Add account
m_actionAccountAdd = new QAction( i18n( "&Add Account..." ), this );
m_actionAccountAdd->setIcon( KIcon("list-add") );
m_actionAccountAdd->setIcon( QIcon::fromTheme("list-add") );
mButtonAccountAdd->setIcon( m_actionAccountAdd->icon() );
mButtonAccountAdd->setText( m_actionAccountAdd->text() );
connect( m_actionAccountAdd, SIGNAL(triggered(bool)), this, SLOT(slotAddAccount()) );
......@@ -554,7 +554,7 @@ void KopeteAccountConfig::configureActions()
// Modify account
m_actionAccountModify = new QAction( i18n( "&Modify Account..." ), this );
m_actionAccountModify->setIcon( KIcon("configure") );
m_actionAccountModify->setIcon( QIcon::fromTheme("configure") );
mButtonAccountModify->setIcon( m_actionAccountModify->icon() );
mButtonAccountModify->setText( m_actionAccountModify->text() );
connect( m_actionAccountModify, SIGNAL(triggered(bool)), this, SLOT(slotModify()));
......@@ -562,7 +562,7 @@ void KopeteAccountConfig::configureActions()
// Remove account
m_actionAccountRemove = new QAction( i18n( "&Remove Account" ), this );
m_actionAccountRemove->setIcon( KIcon("edit-delete") );
m_actionAccountRemove->setIcon( QIcon::fromTheme("edit-delete") );
m_actionAccountRemove->setShortcut(QKeySequence(Qt::Key_Delete));
mButtonAccountRemove->setIcon( m_actionAccountRemove->icon() );
mButtonAccountRemove->setText( m_actionAccountRemove->text() );
......@@ -583,7 +583,7 @@ void KopeteAccountConfig::configureActions()
// Add identity
m_actionIdentityAdd = new QAction( i18n( "Add &Identity..." ), this );
m_actionIdentityAdd->setIcon( KIcon("list-add") );
m_actionIdentityAdd->setIcon( QIcon::fromTheme("list-add") );
mButtonIdentityAdd->setIcon( m_actionIdentityAdd->icon() );
mButtonIdentityAdd->setText( m_actionIdentityAdd->text() );
connect( m_actionIdentityAdd, SIGNAL(triggered(bool)), this, SLOT(slotAddIdentity()) );
......@@ -591,7 +591,7 @@ void KopeteAccountConfig::configureActions()
// Copy identity
m_actionIdentityCopy = new QAction( i18n( "&Copy Identity..." ), this );
m_actionIdentityCopy->setIcon( KIcon("edit-copy") );
m_actionIdentityCopy->setIcon( QIcon::fromTheme("edit-copy") );
mButtonIdentityCopy->setIcon( m_actionIdentityCopy->icon() );
mButtonIdentityCopy->setText( m_actionIdentityCopy->text() );
connect( m_actionIdentityCopy, SIGNAL(triggered(bool)), this, SLOT(slotCopyIdentity()) );
......@@ -599,7 +599,7 @@ void KopeteAccountConfig::configureActions()
// Modify identity
m_actionIdentityModify = new QAction( i18n( "M&odify Identity..." ), this );
m_actionIdentityModify->setIcon( KIcon("configure") );
m_actionIdentityModify->setIcon( QIcon::fromTheme("configure") );
mButtonIdentityModify->setIcon( m_actionIdentityModify->icon() );
mButtonIdentityModify->setText( m_actionIdentityModify->text() );
connect( m_actionIdentityModify, SIGNAL(triggered(bool)), this, SLOT(slotModify()) );
......@@ -607,7 +607,7 @@ void KopeteAccountConfig::configureActions()
// Remove identity
m_actionIdentityRemove = new QAction( i18n( "R&emove Identity" ), this );
m_actionIdentityRemove->setIcon( KIcon("edit-delete") );
m_actionIdentityRemove->setIcon( QIcon::fromTheme("edit-delete") );
mButtonIdentityRemove->setIcon( m_actionIdentityRemove->icon() );
mButtonIdentityRemove->setText( m_actionIdentityRemove->text() );
connect( m_actionIdentityRemove, SIGNAL(triggered(bool)), this, SLOT(removeIdentity()) );
......
......@@ -48,7 +48,7 @@ void ContactListToken::fillMenu( QMenu * menu )
menu->addSeparator();
QAction *smallAction = new QAction( KIcon( "format-font-size-less"), i18n( "Small" ), menu );
QAction *smallAction = new QAction( QIcon::fromTheme( "format-font-size-less"), i18n( "Small" ), menu );
smallAction->setObjectName( ActionSmallName );
smallAction->setCheckable( true );
smallAction->setChecked( m_small );
......
......@@ -35,7 +35,7 @@ Token * TokenFactory::createToken(const QString & text, const QString & iconName
Token::Token( const QString &name, const QString &iconName, int value, QWidget *parent )
: QWidget( parent )
, m_name( name )
, m_icon( KIcon( iconName ) )
, m_icon( QIcon::fromTheme( iconName ) )
, m_iconName( iconName )
, m_value( value )
{
......
......@@ -19,7 +19,7 @@
#ifndef AMAROK_TOKEN_H
#define AMAROK_TOKEN_H
#include <KIcon>
#include <QIcon>
#include <QWidget>
#include <QLabel>
#include <QPixmap>
......
......@@ -62,19 +62,19 @@ TokenWithLayout::~TokenWithLayout()
void TokenWithLayout::fillMenu( QMenu * menu )
{
QAction *boldAction = new QAction( KIcon( "format-text-bold"), i18n( "Bold" ), menu );
QAction *boldAction = new QAction( QIcon::fromTheme( "format-text-bold"), i18n( "Bold" ), menu );
boldAction->setObjectName( ActionBoldName );
boldAction->setCheckable( true );
boldAction->setChecked( m_bold );
QAction *italicAction = new QAction( KIcon( "format-text-italic"), i18n( "Italic" ), menu );
QAction *italicAction = new QAction( QIcon::fromTheme( "format-text-italic"), i18n( "Italic" ), menu );
italicAction->setObjectName( ActionItalicName );
italicAction->setCheckable( true );
italicAction->setChecked( m_italic );
QAction *alignLeftAction = new QAction( KIcon( "format-justify-left"), i18n( "Left" ), menu );
QAction *alignCenterAction = new QAction( KIcon( "format-justify-center"), i18n( "Center" ), menu );
QAction *alignRightAction = new QAction( KIcon( "format-justify-right"), i18n( "Right" ), menu );
QAction *alignLeftAction = new QAction( QIcon::fromTheme( "format-justify-left"), i18n( "Left" ), menu );
QAction *alignCenterAction = new QAction( QIcon::fromTheme( "format-justify-center"), i18n( "Center" ), menu );
QAction *alignRightAction = new QAction( QIcon::fromTheme( "format-justify-right"), i18n( "Right" ), menu );
alignLeftAction->setObjectName( ActionAlignLeftName );
alignLeftAction->setCheckable( true );
alignCenterAction->setObjectName( ActionAlignCenterName );
......
......@@ -95,18 +95,18 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent)
connect(unusedItemsListView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(slotAddButton()));
connect(usedItemsListView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(slotRemoveButton()));
tbUp->setIcon(KIcon("go-up"));
tbUp->setIcon(QIcon::fromTheme("go-up"));
tbUp->setEnabled(false);
tbUp->setAutoRepeat(true);
connect(tbUp, SIGNAL(clicked()), SLOT(slotUpButton()));
tbDown->setIcon(KIcon("go-down"));
tbDown->setIcon(QIcon::fromTheme("go-down"));
tbDown->setEnabled(false);
tbDown->setAutoRepeat(true);
connect(tbDown, SIGNAL(clicked()), SLOT(slotDownButton()));
KIcon left = KIcon("go-previous");
KIcon right = KIcon("go-next");
KIcon left = QIcon::fromTheme("go-previous");
KIcon right = QIcon::fromTheme("go-next");
tbAdd->setIcon(QApplication::isRightToLeft() ? left : right);
tbAdd->setEnabled(false);
......
......@@ -60,7 +60,7 @@ AVDeviceConfig::AVDeviceConfig(QWidget *parent, const QVariantList &args)
// set a default image for the webcam widget, in case the user does not have a video device
mPrfsVideoDevice->mVideoImageLabel->setScaledContents(false);
mPrfsVideoDevice->mVideoImageLabel->setPixmap(KIcon("camera-web").pixmap(128,128));
mPrfsVideoDevice->mVideoImageLabel->setPixmap(QIcon::fromTheme("camera-web").pixmap(128,128));
mVideoDevicePool = NULL;
}
......@@ -134,7 +134,7 @@ void AVDeviceConfig::updateVideoDevicePool()
// set a default image for the webcam widget, in case the user does not have a video device
mPrfsVideoDevice->mVideoImageLabel->setScaledContents(false);
mPrfsVideoDevice->mVideoImageLabel->setPixmap(KIcon("camera-web").pixmap(128,128));
mPrfsVideoDevice->mVideoImageLabel->setPixmap(QIcon::fromTheme("camera-web").pixmap(128,128));
}
}
......@@ -385,7 +385,7 @@ void AVDeviceConfig::deviceUnregistered( const QString & udi )
{
qtimer.stop();
mPrfsVideoDevice->mVideoImageLabel->setScaledContents(false);
mPrfsVideoDevice->mVideoImageLabel->setPixmap(KIcon("camera-web").pixmap(128,128));
mPrfsVideoDevice->mVideoImageLabel->setPixmap(QIcon::fromTheme("camera-web").pixmap(128,128));
capturingDevice_udi.clear();
clearControlGUIElements();
if (mVideoDevicePool->size())
......@@ -413,7 +413,7 @@ void AVDeviceConfig::stopCapturing()
qtimer.stop();
mVideoDevicePool->stopCapturing();
mPrfsVideoDevice->mVideoImageLabel->setScaledContents(false);
mPrfsVideoDevice->mVideoImageLabel->setPixmap(KIcon("camera-web").pixmap(128,128));
mPrfsVideoDevice->mVideoImageLabel->setPixmap(QIcon::fromTheme("camera-web").pixmap(128,128));
capturingDevice_udi.clear();
}
......
......@@ -173,9 +173,9 @@ ChatWindowConfig::ChatWindowConfig(QWidget *parent, const QVariantList &args )
connect(m_styleUi.btnGetStyles, SIGNAL(clicked()),
this, SLOT(slotGetChatStyles()));
m_styleUi.deleteButton->setIcon(KIcon("edit-delete"));
m_styleUi.installButton->setIcon(KIcon("document-import"));
m_styleUi.btnGetStyles->setIcon(KIcon("get-hot-new-stuff"));
m_styleUi.deleteButton->setIcon(QIcon::fromTheme("edit-delete"));
m_styleUi.installButton->setIcon(QIcon::fromTheme("document-import"));
m_styleUi.btnGetStyles->setIcon(QIcon::fromTheme("get-hot-new-stuff"));
// Show the available styles when the Manager has finish to load the styles.
connect(ChatWindowStyleManager::self(), SIGNAL(loadStylesFinished()), this, SLOT(slotLoadChatStyles()));
......
......@@ -36,9 +36,9 @@ StatusConfig_Manager::StatusConfig_Manager( QWidget *parent )
{
setupUi( this );
pbAddStatus->setIcon( KIcon("list-add") );
pbRemove->setIcon( KIcon("edit-delete") );
pbAddGroup->setIcon( KIcon("folder-new") );
pbAddStatus->setIcon( QIcon::fromTheme("list-add") );
pbRemove->setIcon( QIcon::fromTheme("edit-delete") );
pbAddGroup->setIcon( QIcon::fromTheme("folder-new") );
connect( pbAddStatus, SIGNAL(clicked()), SLOT(addStatus()) );
connect( pbRemove, SIGNAL(clicked()), SLOT(removeStatus()) );
......
......@@ -16,7 +16,7 @@
#include "statusmodel.h"
#include <klocale.h>
#include <kicon.h>
#include <QIcon>
#include <QMimeData>
#include <QtXml/QDomDocument>
......
......@@ -24,7 +24,7 @@
#include <QMimeData>
#include <QDomDocument>
#include <KIcon>
#include <QIcon>
#include <KLocale>
#include "kopeteaccount.h"
......@@ -292,14 +292,14 @@ QVariant ContactListTreeModel::data ( const QModelIndex & index, int role ) cons
if ( g->useCustomIcon() )
return g->icon();
else
return KIcon( KOPETE_GROUP_DEFAULT_OPEN_ICON );
return QIcon::fromTheme( KOPETE_GROUP_DEFAULT_OPEN_ICON );
}
else
{
if ( g->useCustomIcon() )
return g->icon();
else
return KIcon( KOPETE_GROUP_DEFAULT_CLOSED_ICON );
return QIcon::fromTheme( KOPETE_GROUP_DEFAULT_CLOSED_ICON );
}
break;
case Kopete::Items::TypeRole:
......
......@@ -28,7 +28,7 @@
#include <QScrollBar>
#include <KDebug>
#include <KIcon>
#include <QIcon>
#include <KMenu>
#include <KStandardAction>
#include <KActionMenu>
......@@ -157,7 +157,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
QAction *actionCreateNewGroup = new QAction( i18n( "Create New Group..." ), ac );
actionCreateNewGroup->setIcon( KIcon( "user-group-new" ) );
actionCreateNewGroup->setIcon( QIcon::fromTheme( "user-group-new" ) );
connect( actionCreateNewGroup, SIGNAL(triggered(bool)), this, SLOT(addGroup()) );
ac->addAction( "AddGroup", actionCreateNewGroup );
......@@ -173,18 +173,18 @@ void KopeteContactListView::initActions( KActionCollection *ac )
QKeySequence(), this, SLOT(copyToGroup()), ac );
ac->addAction( "contactCopy", d->actionCopy );
d->actionMakeMetaContact = new QAction(KIcon("list-add-user"), i18n("Merge Meta Contacts"), ac);
d->actionMakeMetaContact = new QAction(QIcon::fromTheme("list-add-user"), i18n("Merge Meta Contacts"), ac);
ac->addAction( "makeMetaContact", d->actionMakeMetaContact );
connect (d->actionMakeMetaContact, SIGNAL(triggered(bool)), this, SLOT(mergeMetaContact()));
d->actionRemove = KopeteStdAction::deleteContact( this, SLOT(removeGroupOrMetaContact()), ac );
ac->addAction( "contactRemove", d->actionRemove );
d->actionSendEmail = new QAction( KIcon("mail-send"), i18n( "Send Email..." ), ac );
d->actionSendEmail = new QAction( QIcon::fromTheme("mail-send"), i18n( "Send Email..." ), ac );
ac->addAction( "contactSendEmail", d->actionSendEmail );
connect( d->actionSendEmail, SIGNAL(triggered(bool)), this, SLOT(sendEmail()) );
d->actionRename = new QAction( KIcon("edit-rename"), i18nc( "verb, rename a contact", "Rename" ), ac );
d->actionRename = new QAction( QIcon::fromTheme("edit-rename"), i18nc( "verb, rename a contact", "Rename" ), ac );
d->actionRename->setShortcut( QKeySequence(Qt::Key_F2) );
ac->addAction( "contactRename", d->actionRename );
connect( d->actionRename, SIGNAL(triggered(bool)), this, SLOT(rename()) );
......@@ -192,11 +192,11 @@ void KopeteContactListView::initActions( KActionCollection *ac )
d->actionSendFile = KopeteStdAction::sendFile( this, SLOT(sendFile()), ac );
ac->addAction( "contactSendFile", d->actionSendFile );
d->actionAddContact = new KActionMenu( KIcon( QLatin1String("list-add-user") ), i18n( "&Add Contact" ), ac );
d->actionAddContact = new KActionMenu( QIcon::fromTheme( QLatin1String("list-add-user") ), i18n( "&Add Contact" ), ac );
ac->addAction( "contactAddContact", d->actionAddContact );
d->actionAddContact->menu()->addTitle( i18n("Select Account") );
d->actionAddTemporaryContact = new QAction( KIcon("list-add-user"), i18n( "Add to Your Contact List" ), ac );
d->actionAddTemporaryContact = new QAction( QIcon::fromTheme("list-add-user"), i18n( "Add to Your Contact List" ), ac );
ac->addAction( "contactAddTemporaryContact", d->actionAddTemporaryContact );
connect( d->actionAddTemporaryContact, SIGNAL(triggered(bool)), this, SLOT(addTemporaryContact()) );
......@@ -207,7 +207,7 @@ void KopeteContactListView::initActions( KActionCollection *ac )
connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(const Kopete::Account*)),
this, SLOT(removeToAddContactMenu(const Kopete::Account*)) );
d->actionProperties = new QAction( KIcon("user-properties"), i18n( "&Properties" ), ac );
d->actionProperties = new QAction( QIcon::fromTheme("user-properties"), i18n( "&Properties" ), ac );
ac->addAction( "contactProperties", d->actionProperties );
d->actionProperties->setShortcut( QKeySequence(Qt::Key_Alt + Qt::Key_Return) );
connect( d->actionProperties, SIGNAL(triggered(bool)), this, SLOT(showItemProperties()) );
......@@ -944,7 +944,7 @@ void KopeteContactListView::slotSettingsChanged()
void KopeteContactListView::addToAddContactMenu( Kopete::Account* account )
{
QAction *action = new QAction( KIcon( QIcon( account->accountIcon() ) ), account->accountLabel(), this );
QAction *action = new QAction( QIcon( account->accountIcon() ) , account->accountLabel(), this );
connect( action, SIGNAL(triggered(bool)), this, SLOT(addContact()) );
d->addContactAccountMap.insert( action, account );
d->actionAddContact->addAction( action );
......
......@@ -22,7 +22,7 @@
#include <kdebug.h>
#include <kguiitem.h>
#include <klocale.h>
#include <kicon.h>
#include <QIcon>
#include <QAction>
#include <kcmultidialog.h>
......@@ -31,7 +31,7 @@
KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const QKeySequence &cut, const QObject *receiver,
const char *slot, QObject* parent )
: KSelectAction( KIcon(pix), text, parent )
: KSelectAction( QIcon::fromTheme(pix), text, parent )
{
setShortcut(cut);
if( receiver && slot )
......
......@@ -208,7 +208,7 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(Kopete::MetaContact *metaContact, QWidget
connect( ui_mainWidget->cmbAccountPhoto, SIGNAL(activated(int)), SLOT(slotEnableAndDisableWidgets()));
ui_mainWidget->btnClearPhoto->setIcon( KIcon( (QApplication::layoutDirection() == Qt::RightToLeft) ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" ) );
ui_mainWidget->btnClearPhoto->setIcon( QIcon::fromTheme( (QApplication::layoutDirection() == Qt::RightToLeft) ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" ) );
connect( ui_mainWidget->btnClearPhoto, SIGNAL(clicked()), this, SLOT(slotClearPhotoClicked()) );
connect( ui_mainWidget->widAddresseeLink, SIGNAL(addresseeChanged(KABC::Addressee)), SLOT(slotAddresseeChanged(KABC::Addressee)) );
connect( ui_mainWidget->btnChoosePhoto, SIGNAL(clicked()), this, SLOT(slotSelectPhoto()));
......
......@@ -21,7 +21,7 @@
#include <QHeaderView>
#include <QMap>
#include <QPointer>
#include <KIcon>
#include <QIcon>
#include <KMessageBox>
#include "kopeteidentity.h"
......@@ -55,7 +55,7 @@ AccountIdentityDialog::AccountIdentityDialog( QWidget *parent )
setButtons(KDialog::Ok | KDialog::Cancel);
d->ui.setupUi(mainWidget());
d->ui.identityList->setColumnCount( 1 );
d->ui.title->setPixmap(KIcon("identity").pixmap(22,22), KTitleWidget::ImageRight);
d->ui.title->setPixmap(QIcon::fromTheme("identity").pixmap(22,22), KTitleWidget::ImageRight);
QHeaderView *header = d->ui.identityList->header();
header->setVisible(false);
......@@ -115,7 +115,7 @@ void AccountIdentityDialog::slotLoadIdentities()
continue;
QTreeWidgetItem *identityItem = new QTreeWidgetItem(d->ui.identityList);
identityItem->setIcon(0, KIcon(ident->customIcon()));
identityItem->setIcon(0, QIcon::fromTheme(ident->customIcon()));
identityItem->setText(0, ident->label());
d->identityItems.insert(identityItem, ident);
if (ident == d->currentIdentity)
......
......@@ -21,7 +21,7 @@
#include "ui_identitygeneral.h"
#include "ui_identitydetailed.h"
#include <KIcon>
#include <QIcon>
#include <kopeteidentity.h>
#include <avatardialog.h>
......@@ -49,8 +49,8 @@ IdentityDialog::IdentityDialog(Kopete::Identity *identity, QWidget *parent)
// add the general page
QWidget *w = new QWidget(this);
d->general.setupUi(w);
d->general.selectPhoto->setIcon(KIcon("view-preview"));
d->general.clearPhoto->setIcon(KIcon("edit-clear-locationbar-rtl"));
d->general.selectPhoto->setIcon(QIcon::fromTheme("view-preview"));
d->general.clearPhoto->setIcon(QIcon::fromTheme("edit-clear-locationbar-rtl"));
d->general.photo->setText( QString("<qt><a href=\"selectPhoto\">"
"<p align=\"center\">%1</p>"
"</a></qt>").arg( i18n("No Photo") ));
......@@ -68,7 +68,7 @@ IdentityDialog::IdentityDialog(Kopete::Identity *identity, QWidget *parent)
d->detailed.setupUi(w);
addWidget(w, i18n("Detailed Information"));
setIcon(KIcon(d->identity->customIcon()));
setIcon(QIcon::fromTheme(d->identity->customIcon()));
load();
}
......
......@@ -21,7 +21,7 @@
#include "ui_identitystatusbase.h"
#include "addaccountwizard.h"
#include <KIcon>
#include <QIcon>
#include <KMenu>
#include <KActionMenu>
#include <QTimeLine>
......@@ -195,7 +195,7 @@ void IdentityStatusWidget::load()
d->ui.photo->setIcon( QIcon( d->photoPath ) );
} else {
d->photoPath.clear();
d->ui.photo->setIcon( KIcon( "user-identity" ) );
d->ui.photo->setIcon( QIcon::fromTheme( "user-identity" ) );
}
d->ui.identityName->setText(d->identity->label());
......@@ -204,7 +204,7 @@ void IdentityStatusWidget::load()
addAccountItem( a );
}
if ( d->identity->accounts().isEmpty() ) {
new QListWidgetItem( KIcon("configure" ), i18nc("Button to open account configuration widget", "Click to add an account" ), d->ui.accounts );
new QListWidgetItem( QIcon::fromTheme("configure" ), i18nc("Button to open account configuration widget", "Click to add an account" ), d->ui.accounts );
}
resizeAccountListWidget();
}
......@@ -240,7 +240,7 @@ void IdentityStatusWidget::slotAccountUnregistered( const Kopete::Account *accou
delete item;
if ( d->identity && d->identity->accounts().isEmpty() ) {
new QListWidgetItem( KIcon("configure" ), i18nc("Button to open account configuration widget", "Click to add an account" ), d->ui.accounts );
new QListWidgetItem( QIcon::fromTheme("configure" ), i18nc("Button to open account configuration widget", "Click to add an account" ), d->ui.accounts );