StatusItemNotifier: fix overlays by name with icons by name

Authored by pino on Sat, Jan 5, 10:33 AM.



Setting an overlay by name results in a QIcon for it created; OTOH,
this icon is never used to create the final image in case the
main/attention icons are set by name too.

Since KIconEngine supports overlays natively, directly pass the list of
overlays (with just one element -- the overlay set) to it. As result,
main/attention icons by name are created directly with the requested
overlay by name.

Test Plan
  • builds fine
  • main/attention icon by name + overlay by name works now, showing the requested overlay
  • main/attention icon by name + overlay by pixmap still works as before
  • main/attention icon by pixmap is unaffected, no matter whether/which overlay is set
  • the system tray icons of juk, and amarok now have the play/pause overlays

Diff Detail

R120 Plasma Workspace
sni-overlays (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 6663
Build 6681: arc lint + arc unit
pino created this revision.Sat, Jan 5, 10:33 AM
Restricted Application added a project: Plasma. · View Herald TranscriptSat, Jan 5, 10:33 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
pino requested review of this revision.Sat, Jan 5, 10:33 AM
apol added a subscriber: apol.Mon, Jan 7, 3:33 PM

Makes a lot of sense overall, I'd just like to make sure we're not missing something.


Can this bit be removed then?

pino added inline comments.Mon, Jan 7, 3:47 PM

No, this is needed for the "overlay by pixmap" case: overlayNames is empty (because no overlay name is available), while overlay is not null (as read by the pixmap)

apol accepted this revision.Mon, Jan 7, 3:49 PM
This revision is now accepted and ready to land.Mon, Jan 7, 3:49 PM
pino added a comment.Mon, Jan 7, 3:58 PM

Thanks -- which branch should I push this to? Plasma/5.12, Plasma/5.14, or only master for now?