Commit 3ba955f4 authored by Konrad Materka's avatar Konrad Materka
Browse files

[SystemTray] Fix model update in settings (missing icon)

Fixes a bug, when system tray settings is opened and new application is opened, view is not correctly refreshed and icon is missing. Caused by duplicated role names. Related to: D26586

BUG: 416400
FIXED-IN: 5.18.0

Test Plan:
1. Open system tray settings
2. Open an app with systray icon
Icon, title etc are correctly rendered.

Reviewers: #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik

Reviewed By: #plasma_workspaces, #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 82d7fd7a
......@@ -265,6 +265,14 @@ QHash<int, QByteArray> SystemTrayModel::roleNames() const
void SystemTrayModel::addSourceModel(QAbstractItemModel *sourceModel)
QHashIterator<int, QByteArray> it(sourceModel->roleNames());
while (it.hasNext()) {;
if (!m_roleNames.contains(it.key())) {
m_roleNames.insert(it.key(), it.value());
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