diff --git a/kcms/icons/main.cpp b/kcms/icons/main.cpp index c865233d8..8deda58b1 100644 --- a/kcms/icons/main.cpp +++ b/kcms/icons/main.cpp @@ -186,15 +186,12 @@ void IconModule::processPendingDeletions() m_model->removeItemsPendingDeletion(); } -void IconModule::ghnsEntriesChanged(const QQmlListReference &changedEntries) +void IconModule::ghnsEntriesChanged() { - if (changedEntries.count() == 0) { - return; - } - // reload the display icontheme items + KIconTheme::reconfigure(); KIconLoader::global()->newIconLoader(); - m_model->load(); + load(); QPixmapCache::clear(); } diff --git a/kcms/icons/main.h b/kcms/icons/main.h index 52e5caa2d..88b88c259 100644 --- a/kcms/icons/main.h +++ b/kcms/icons/main.h @@ -74,7 +74,7 @@ public: void load() override; void save() override; - Q_INVOKABLE void ghnsEntriesChanged(const QQmlListReference &changedEntries); + Q_INVOKABLE void ghnsEntriesChanged(); Q_INVOKABLE void installThemeFromFile(const QUrl &url); Q_INVOKABLE QList availableIconSizes(int group) const; diff --git a/kcms/icons/package/contents/ui/main.qml b/kcms/icons/package/contents/ui/main.qml index 290faf037..7427ae2b2 100644 --- a/kcms/icons/package/contents/ui/main.qml +++ b/kcms/icons/package/contents/ui/main.qml @@ -262,7 +262,12 @@ KCM.GridViewKCM { text: i18n("Get New Icons...") configFile: "icons.knsrc" viewMode: NewStuff.Page.ViewMode.Preview - onChangedEntriesChanged: kcm.ghnsEntriesChanged(newStuffButton.changedEntries); + Connections { + target: newStuffButton.engine.engine + function onSignalEntryEvent(entry, event) { + kcm.ghnsEntriesChanged(); + } + } } } }