D29386: [systemtray] Fix SNI icon not rendering
Konrad Materka
noreply at phabricator.kde.org
Sun May 3 15:48:01 BST 2020
kmaterka created this revision.
kmaterka added reviewers: Plasma: Workspaces, Plasma, davidedmundson, broulik, ngraham.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
kmaterka requested review of this revision.
REVISION SUMMARY
In some rare situations SNI icons are not rendered. It happens randomly, only some users are affected. It does not happen on every login.
Only SNI icons are not rendered, Plasmoids are fine. Restarting plasmashell or re-adding systemtray applet helps.
In QML all roles need to be defined before model is used. When data engines is used a a source for a data model, all roles has to be defined and proper value assigned (not a null QVariant). StatusNotifierItemSource does this properly, but in some situations it sets null QVariant for Icon. Setting empty/null QVariant removes key/role from the date set (DataConteiner implementation). If data model was loaded earlier or later when Icon has proper value it will work properly. In some rare situation it is possible that data model is loaded when Icon has null value assigned (in other words - removed), role is removed from the data model and not avaiable to system tray applet.
This fix makes sure that there is always a value for Icon role. To check if icon is null native method has to be used - QML does not understand that QIcon can be null.
BUG: 419305
FIXED-IN: 5.18.5
TEST PLAN
I don't have any reliable method to reproduce this issue.
REPOSITORY
R120 Plasma Workspace
BRANCH
Plasma/5.18
REVISION DETAIL
https://phabricator.kde.org/D29386
AFFECTED FILES
applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
applets/systemtray/systemtray.cpp
applets/systemtray/systemtray.h
dataengines/statusnotifieritem/statusnotifieritemsource.cpp
To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, broulik, ngraham
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200503/0f45ee97/attachment.html>
More information about the Plasma-devel
mailing list