Commit 07cf18a6 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Reload KCM when entry was adopted

This solves the UI sync issues when using the adoption command.

CCBUG: 417983
parent 527dd737
......@@ -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();
}
......
......@@ -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<int> availableIconSizes(int group) const;
......
......@@ -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();
}
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment