Commit 40bf43ad authored by Konrad Materka's avatar Konrad Materka Committed by Nate Graham
Browse files

[dataengines/sni] Reapply IconThemePath on icon theme change

SNI can have custom icon path in IconThemePath attribute.
StatusNotifierItemSource uses custom KIconLoader to add this theme dir.

KIconLoader forgets this path on any system change
(for example when icon theme is change in system settings).

Reapply custom theme path on KIconLoader::iconChanged.

BUG: 433557
FIXED-IN: 5.22.0
parent ea95ebd0
......@@ -264,6 +264,11 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call)
// add app dir requires an app name, though this is completely unused in this context
m_customIconLoader->addAppDir(appName.size() ? appName : QStringLiteral("unused"), path);
connect(m_customIconLoader, &KIconLoader::iconChanged, this, [=] {
m_customIconLoader->reconfigure(appName, QStringList(path));
m_customIconLoader->addAppDir(appName.size() ? appName : QStringLiteral("unused"), path);
});
}
setData(QStringLiteral("IconThemePath"), path);
......
Supports Markdown
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