Fix some status notifier items not appearing
ClosedPublic

Authored by davidedmundson on Aug 27 2016, 11:21 PM.

Details

Summary

Set the initial values for all the things
This is important as Plasma::DataModel has an unsolvable bug
When it gets data with a new key it tries to update the QAIM roleNames
From QML this achieves absolutely nothing as there is no signal to tell
QQmlDelegateModel to reload the roleNames in QQmlAdapatorModel
No matter if the row changes or the model refreshes
This means it does not re-evaluate what bindings exist (watchedRoleIds)
and we get properties that don't bind for this or any future SNI.

The main source of this problem is syncStatus can occur before
refreshCallback; but whilst that's easy to guard against, there's still
multiple if{} blocks that don't set various keys in refreshCallback()
which would all need changing too. This seemed cleaner and easier to
manage.

BUG: 366283
BUG: 367756

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Fix some status notifier items not appearing.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 27 2016, 11:21 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

From bugzilla:
[reply] [−] Comment 4 Slaviro 2016-08-29 13:27:51 UTC
Patched my Plasma-workspace 5.7.4 and looks like the problem is gone. At least, I don't see it anymore after a couple of reboots.

broulik added inline comments.
dataengines/statusnotifieritem/statusnotifieritemsource.cpp
85

Wrong indentation

90

AttentionIcon is a QIcon

94

This is also a QIcon

106

This apparently can be both QString and QIcon...

111

Two superfluous empty lines

davidedmundson marked 2 inline comments as done.

Fixed Kai's comments

davidedmundson added inline comments.Sep 6 2016, 8:48 AM
dataengines/statusnotifieritem/statusnotifieritemsource.cpp
85

There is in Phab, but there isn't on my computer... No idea why.

mart accepted this revision.Sep 9 2016, 11:40 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Sep 9 2016, 11:40 AM
This revision was automatically updated to reflect the committed changes.