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
davidedmundson | |
ngraham | |
broulik |
Plasma: Workspaces | |
Plasma |
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
Expected:
Icon, title etc are correctly rendered.
No Linters Available |
No Unit Test Coverage |
Buildable 21601 | |
Build 21619: arc lint + arc unit |
applets/systemtray/systemtraymodel.cpp | ||
---|---|---|
269 | Avoid keys() which creates a temporary list, instead use iterators const auto roleNames = sourceModel->roleNames(); for (auto it = roleNames.begin(), end = roleNames.end(); it != end; ++it) { if (!m_roleNames.contains(it.key()) { m_roleNames.insert(it.key(), it.value()); } } |
applets/systemtray/systemtraymodel.cpp | ||
---|---|---|
269 | Done. Does it matter if I use Java-style iterator or STL-style? Documentation says that STL-style is slightly faster, but I like Java -style more. I checked plasma-workspace and both are used. |