[Device Notifier] Be more declarative
ClosedPublic

Authored by broulik on Jun 7 2016, 7:50 PM.

Details

Summary

Instead of having a bunch of handlers in various places messing with various settings, try to use declarative bindings where possible.

  • Remove separate passive timer, instead re-use the pendingDelegateRemoval property which has its own timer. This way, when a device is unmounted, device notifier stays active until the notification has cleared, however, when the device is yanked out manually, it disappears right away
  • Don't break binding on Plasmoid.active to ensure its state is always proper depending on whether a device or not is present (the linked bug)
  • Create tooltip declaratively rather than imperatively

BUG: 362992
FIXED-IN: 5.7.0

Test Plan
  • Started plasma with no usb stick - initially passive
  • Start plasma with - immediately active
  • Plugged in usb stick - got popup with active state
  • Plugged it out - immediately got passive
  • Plugged back in - got popup with active state
  • Mounted and then unmounted - got popup with notification, stayed active until notification cleared

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 updated this revision to Diff 4285.Jun 7 2016, 7:50 PM
broulik retitled this revision from to [Device Notifier] Be more declarative.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added a reviewer: Plasma.
broulik set the repository for this revision to R120 Plasma Workspace.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 7 2016, 7:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Jun 10 2016, 10:40 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Jun 10 2016, 10:40 AM
This revision was automatically updated to reflect the committed changes.