https://bugs.kde.org/show_bug.cgi?id=419305

Konrad Materka <mate...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/pla
                   |                            |sma-workspace/77975468dc108
                   |                            |e87e0bc491ac2c2da7276a6b518
   Version Fixed In|                            |5.18.5
             Status|CONFIRMED                   |RESOLVED

--- Comment #28 from Konrad Materka <mate...@gmail.com> ---
Git commit 77975468dc108e87e0bc491ac2c2da7276a6b518 by Konrad Materka.
Committed on 04/05/2020 at 17:23.
Pushed by kmaterka into branch 'Plasma/5.18'.

[systemtray] Fix SNI icon not rendering

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.
FIXED-IN: 5.18.5

Test Plan: I don't have any reliable method to reproduce this issue.

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

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29386

M  +6    -2   
applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
M  +5    -0    applets/systemtray/systemtray.cpp
M  +7    -0    applets/systemtray/systemtray.h
M  +2    -2    dataengines/statusnotifieritem/statusnotifieritemsource.cpp

https://commits.kde.org/plasma-workspace/77975468dc108e87e0bc491ac2c2da7276a6b518

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to