diff --git a/kcms/hardware/joystick/joywidget.cpp b/kcms/hardware/joystick/joywidget.cpp --- a/kcms/hardware/joystick/joywidget.cpp +++ b/kcms/hardware/joystick/joywidget.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/kcms/keys/CMakeLists.txt b/kcms/keys/CMakeLists.txt --- a/kcms/keys/CMakeLists.txt +++ b/kcms/keys/CMakeLists.txt @@ -32,7 +32,6 @@ KF5::KCMUtils KF5::GlobalAccel KF5::I18n - KF5::IconThemes KF5::KIOWidgets KF5::XmlGui KF5::ItemModels diff --git a/kcms/keys/kglobalshortcutseditor.cpp b/kcms/keys/kglobalshortcutseditor.cpp --- a/kcms/keys/kglobalshortcutseditor.cpp +++ b/kcms/keys/kglobalshortcutseditor.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -431,23 +430,22 @@ editor = new KShortcutsEditor(this, d->actionTypes); d->stack->addWidget(editor); - // try to find one appropriate icon ( allowing NULL pixmap to be returned) - QPixmap pixmap = KIconLoader::global()->loadIcon(id, KIconLoader::Small, 0, - KIconLoader::DefaultState, QStringList(), nullptr, true); - if (pixmap.isNull()) { + // try to find one appropriate icon + QIcon icon = QIcon::fromTheme(id); + if (icon.isNull()) { KService::Ptr service = KService::serviceByStorageId(id); - if(service) { - pixmap = KIconLoader::global()->loadIcon(service->icon(), KIconLoader::Small, 0, - KIconLoader::DefaultState, QStringList(), nullptr, true); + if (service) { + icon = QIcon::fromTheme(service->icon()); } } - // if NULL pixmap is returned, use the F.D.O "system-run" icon - if (pixmap.isNull()) { - pixmap = KIconLoader::global()->loadIcon(QStringLiteral("system-run"), KIconLoader::Small); + + // if NULL icon is returned, use the F.D.O "system-run" icon + if (icon.isNull()) { + icon = QIcon::fromTheme(QStringLiteral("system-run")); } // Add to the component list - QStandardItem *item = new QStandardItem(pixmap, friendlyName); + QStandardItem *item = new QStandardItem(icon, friendlyName); if (id.endsWith(QLatin1String(".desktop"))) { item->setData(i18n("Application Launchers"), KCategorizedSortFilterProxyModel::CategoryDisplayRole); item->setData(0, KCategorizedSortFilterProxyModel::CategorySortRole); diff --git a/kcms/runners/CMakeLists.txt b/kcms/runners/CMakeLists.txt --- a/kcms/runners/CMakeLists.txt +++ b/kcms/runners/CMakeLists.txt @@ -13,7 +13,6 @@ KF5::KCMUtils KF5::Runner KF5::I18n - KF5::IconThemes Qt5::DBus Qt5::Widgets diff --git a/kcms/runners/kcm.cpp b/kcms/runners/kcm.cpp --- a/kcms/runners/kcm.cpp +++ b/kcms/runners/kcm.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include