diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index fccccb87bb..ca04fb64c1 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -23,12 +23,12 @@ along with this program. If not, see . #include #include +#include #include #include #include #include #include -#include #include #include @@ -1008,7 +1008,7 @@ void CoverSwitchEffect::updateCaption() if (selected_window->isDesktop()) { captionFrame->setText(i18nc("Special entry in alt+tab list for minimizing all windows", "Show Desktop")); - static QPixmap pix = KIcon(QStringLiteral("user-desktop")).pixmap(captionFrame->iconSize()); + static QPixmap pix = QIcon::fromTheme(QStringLiteral("user-desktop")).pixmap(captionFrame->iconSize()); captionFrame->setIcon(pix); } else { captionFrame->setText(selected_window->caption()); diff --git a/effects/flipswitch/flipswitch.cpp b/effects/flipswitch/flipswitch.cpp index 0c67678048..92040bc201 100644 --- a/effects/flipswitch/flipswitch.cpp +++ b/effects/flipswitch/flipswitch.cpp @@ -31,7 +31,6 @@ along with this program. If not, see . #include #include #include -#include #include #include @@ -952,7 +951,7 @@ void FlipSwitchEffect::updateCaption() if (m_selectedWindow->isDesktop()) { m_captionFrame->setText(i18nc("Special entry in alt+tab list for minimizing all windows", "Show Desktop")); - static QPixmap pix = KIcon(QStringLiteral("user-desktop")).pixmap(m_captionFrame->iconSize()); + static QPixmap pix = QIcon::fromTheme(QStringLiteral("user-desktop")).pixmap(m_captionFrame->iconSize()); m_captionFrame->setIcon(pix); } else { m_captionFrame->setText(m_selectedWindow->caption()); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index 77a8cea312..b67cfb3848 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -25,7 +25,6 @@ along with this program. If not, see . #include #include #include -#include #include #include #include @@ -575,8 +574,7 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e) m_dragInProgress = false; m_dragWindow = NULL; if (m_highlightedDropTarget) { - KIcon icon(QStringLiteral("user-trash")); - m_highlightedDropTarget->setIcon(icon.pixmap(QSize(128, 128), QIcon::Normal)); + m_highlightedDropTarget->setIcon(QIcon::fromTheme(QStringLiteral("user-trash")).pixmap(QSize(128, 128), QIcon::Normal)); m_highlightedDropTarget = NULL; } effects->addRepaintFull(); @@ -615,8 +613,7 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e) m_dragWindow = NULL; if (m_highlightedDropTarget) { effects->addRepaint(m_highlightedDropTarget->geometry()); - KIcon icon(QStringLiteral("user-trash")); - m_highlightedDropTarget->setIcon(icon.pixmap(QSize(128, 128), QIcon::Normal)); + m_highlightedDropTarget->setIcon(QIcon::fromTheme(QStringLiteral("user-trash")).pixmap(QSize(128, 128), QIcon::Normal)); m_highlightedDropTarget = NULL; } effects->defineCursor(Qt::PointingHandCursor); @@ -649,14 +646,12 @@ void PresentWindowsEffect::windowInputMouseEvent(QEvent *e) } if (target && !m_highlightedDropTarget) { m_highlightedDropTarget = target; - KIcon icon(QStringLiteral("user-trash")); effects->addRepaint(m_highlightedDropTarget->geometry()); - m_highlightedDropTarget->setIcon(icon.pixmap(QSize(128, 128), QIcon::Active)); + m_highlightedDropTarget->setIcon(QIcon::fromTheme(QStringLiteral("user-trash")).pixmap(QSize(128, 128), QIcon::Active)); effects->defineCursor(Qt::DragMoveCursor); } else if (!target && m_highlightedDropTarget) { - KIcon icon(QStringLiteral("user-trash")); effects->addRepaint(m_highlightedDropTarget->geometry()); - m_highlightedDropTarget->setIcon(icon.pixmap(QSize(128, 128), QIcon::Normal)); + m_highlightedDropTarget->setIcon(QIcon::fromTheme(QStringLiteral("user-trash")).pixmap(QSize(128, 128), QIcon::Normal)); m_highlightedDropTarget = NULL; effects->defineCursor(Qt::ForbiddenCursor); } @@ -1938,8 +1933,7 @@ void PresentWindowsEffect::screenCountChanged() if (m_dragToClose) { const QRect screenRect = effects->clientArea(FullScreenArea, i, 1); EffectFrame *frame = effects->effectFrame(EffectFrameNone, false); - KIcon icon(QStringLiteral("user-trash")); - frame->setIcon(icon.pixmap(QSize(128, 128))); + frame->setIcon(QIcon::fromTheme(QStringLiteral("user-trash")).pixmap(QSize(128, 128))); frame->setPosition(QPoint(screenRect.x() + screenRect.width(), screenRect.y())); frame->setAlignment(Qt::AlignRight | Qt::AlignTop); m_dropTargets.append(frame); diff --git a/effects/zoom/zoom_config.cpp b/effects/zoom/zoom_config.cpp index 66c1726e59..5edd8c6a48 100644 --- a/effects/zoom/zoom_config.cpp +++ b/effects/zoom/zoom_config.cpp @@ -30,7 +30,6 @@ along with this program. If not, see . #include #include #include -#include #include @@ -78,42 +77,42 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) : KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_0); a = actionCollection->addAction(QStringLiteral("MoveZoomLeft")); - a->setIcon(KIcon(QStringLiteral("go-previous"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("go-previous"))); a->setText(i18n("Move Left")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_Left); KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_Left); a = actionCollection->addAction(QStringLiteral("MoveZoomRight")); - a->setIcon(KIcon(QStringLiteral("go-next"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("go-next"))); a->setText(i18n("Move Right")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_Right); KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_Right); a = actionCollection->addAction(QStringLiteral("MoveZoomUp")); - a->setIcon(KIcon(QStringLiteral("go-up"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("go-up"))); a->setText(i18n("Move Up")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_Up); KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_Up); a = actionCollection->addAction(QStringLiteral("MoveZoomDown")); - a->setIcon(KIcon(QStringLiteral("go-down"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("go-down"))); a->setText(i18n("Move Down")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_Down); KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_Down); a = actionCollection->addAction(QStringLiteral("MoveMouseToFocus")); - a->setIcon(KIcon(QStringLiteral("view-restore"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("view-restore"))); a->setText(i18n("Move Mouse to Focus")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_F5); KGlobalAccel::self()->setShortcut(a, QList() << Qt::META + Qt::Key_F5); a = actionCollection->addAction(QStringLiteral("MoveMouseToCenter")); - a->setIcon(KIcon(QStringLiteral("view-restore"))); + a->setIcon(QIcon::fromTheme(QStringLiteral("view-restore"))); a->setText(i18n("Move Mouse to Center")); a->setProperty("isConfigurationAction", true); KGlobalAccel::self()->setDefaultShortcut(a, QList() << Qt::META + Qt::Key_F6);