[Notifications] Clean up States
ClosedPublic

Authored by broulik on Aug 15 2017, 9:39 AM.

Details

Summary

While I'm usually a huge fan of States, this is done only half-way with States in the compact representation (NotificationIcon) overwriting the plasmoid's state in addition to there being a binding on it in main.qml.
It also used a "default" state (note: the default state in QML is empty string) in addition to assigning default values on items themselves anyway.
This seems to shift evaluation of bindings into an order where we first stop the BusyIndicator and then become passive, moving the the systray popup, working around the Qt crash we're seeing. It's a nice clean up in any case imho.

CCBUG: 381105

Test Plan
  • Verified the applet becomes active when there's a persistent notification or a running job
  • Verified the icon changes to gray outline circle when passive notification is there and gray filled circle if a job is running
  • Verified it didn't break when I disabled "track job progress" in applet settings (will unload "jobs")
  • Failed to crash plasma by starting a job and then cancelling it with the applet open

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.
broulik created this revision.Aug 15 2017, 9:39 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 15 2017, 9:39 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Aug 15 2017, 9:40 AM
This revision is now accepted and ready to land.Aug 15 2017, 9:40 AM
This revision was automatically updated to reflect the committed changes.