KDE::icon becomes QIcon::fromTheme

This commit is contained in:
Sebastian Kügler 2013-04-02 12:55:37 +02:00
parent 9e9b080392
commit b1ce94159d
5 changed files with 8 additions and 7 deletions

View File

@ -298,7 +298,7 @@ QString AbstractRunner::name() const
QIcon AbstractRunner::icon() const QIcon AbstractRunner::icon() const
{ {
if (d->runnerDescription.isValid()) { if (d->runnerDescription.isValid()) {
return KDE::icon(d->runnerDescription.icon()); return QIcon::fromTheme(d->runnerDescription.icon());
} }
return QIcon(); return QIcon();

View File

@ -241,7 +241,7 @@ void Corona::setImmutability(const ImmutabilityType immutable)
} else { } else {
bool unlocked = d->immutability == Mutable; bool unlocked = d->immutability == Mutable;
action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets")); action->setText(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets"));
action->setIcon(KDE::icon(unlocked ? "object-locked" : "object-unlocked")); action->setIcon(QIcon::fromTheme(unlocked ? "object-locked" : "object-unlocked"));
action->setEnabled(true); action->setEnabled(true);
action->setVisible(true); action->setVisible(true);
} }
@ -316,7 +316,7 @@ void CoronaPrivate::init()
QObject::connect(lockAction, SIGNAL(triggered(bool)), q, SLOT(toggleImmutability())); QObject::connect(lockAction, SIGNAL(triggered(bool)), q, SLOT(toggleImmutability()));
lockAction->setText(i18n("Lock Widgets")); lockAction->setText(i18n("Lock Widgets"));
lockAction->setAutoRepeat(true); lockAction->setAutoRepeat(true);
lockAction->setIcon(KDE::icon("object-locked")); lockAction->setIcon(QIcon::fromTheme("object-locked"));
lockAction->setData(Plasma::ControlAction); lockAction->setData(Plasma::ControlAction);
lockAction->setShortcut(KShortcut("alt+d, l")); lockAction->setShortcut(KShortcut("alt+d, l"));
lockAction->setShortcutContext(Qt::ApplicationShortcut); lockAction->setShortcutContext(Qt::ApplicationShortcut);

View File

@ -198,21 +198,21 @@ KActionCollection* AppletPrivate::defaultActions(QObject *parent)
KAction *configAction = actions->add<KAction>("configure"); KAction *configAction = actions->add<KAction>("configure");
configAction->setAutoRepeat(false); configAction->setAutoRepeat(false);
configAction->setText(i18n("Widget Settings")); configAction->setText(i18n("Widget Settings"));
configAction->setIcon(KDE::icon("configure")); configAction->setIcon(QIcon::fromTheme("configure"));
configAction->setShortcut(KShortcut("alt+d, s")); configAction->setShortcut(KShortcut("alt+d, s"));
configAction->setData(Plasma::ConfigureAction); configAction->setData(Plasma::ConfigureAction);
KAction *closeApplet = actions->add<KAction>("remove"); KAction *closeApplet = actions->add<KAction>("remove");
closeApplet->setAutoRepeat(false); closeApplet->setAutoRepeat(false);
closeApplet->setText(i18n("Remove this Widget")); closeApplet->setText(i18n("Remove this Widget"));
closeApplet->setIcon(KDE::icon("edit-delete")); closeApplet->setIcon(QIcon::fromTheme("edit-delete"));
closeApplet->setShortcut(KShortcut("alt+d, r")); closeApplet->setShortcut(KShortcut("alt+d, r"));
closeApplet->setData(Plasma::DestructiveAction); closeApplet->setData(Plasma::DestructiveAction);
KAction *runAssociatedApplication = actions->add<KAction>("run associated application"); KAction *runAssociatedApplication = actions->add<KAction>("run associated application");
runAssociatedApplication->setAutoRepeat(false); runAssociatedApplication->setAutoRepeat(false);
runAssociatedApplication->setText(i18n("Run the Associated Application")); runAssociatedApplication->setText(i18n("Run the Associated Application"));
runAssociatedApplication->setIcon(KDE::icon("system-run")); runAssociatedApplication->setIcon(QIcon::fromTheme("system-run"));
runAssociatedApplication->setShortcut(KShortcut("alt+d, t")); runAssociatedApplication->setShortcut(KShortcut("alt+d, t"));
runAssociatedApplication->setVisible(false); runAssociatedApplication->setVisible(false);
runAssociatedApplication->setEnabled(false); runAssociatedApplication->setEnabled(false);

View File

@ -67,7 +67,7 @@ void ContainmentPrivate::addDefaultActions(KActionCollection *actions, Containme
KAction *appletBrowserAction = actions->add<KAction>("add widgets"); KAction *appletBrowserAction = actions->add<KAction>("add widgets");
appletBrowserAction->setAutoRepeat(false); appletBrowserAction->setAutoRepeat(false);
appletBrowserAction->setText(i18n("Add Widgets...")); appletBrowserAction->setText(i18n("Add Widgets..."));
appletBrowserAction->setIcon(KDE::icon("list-add")); appletBrowserAction->setIcon(QIcon::fromTheme("list-add"));
appletBrowserAction->setShortcut(KShortcut("alt+d, a")); appletBrowserAction->setShortcut(KShortcut("alt+d, a"));
appletBrowserAction->setData(Plasma::AddAction); appletBrowserAction->setData(Plasma::AddAction);
} }

View File

@ -300,3 +300,4 @@ class PLASMA_EXPORT RunnerManager : public QObject
} }
#endif #endif