[DBusMenuImporter] Don't call removeAction() to avoid an empty QMenu
ClosedPublic

Authored by broulik on Oct 18 2018, 11:03 AM.

Details

Summary

As soon as QMenu becomes empty it is closed. This can happen when the application completely reloads its menu.
Instead, call deleteLater which will destroy the QAction later at which point it is automatically removed from the menu.

BUG: 399975

Test Plan

A less invasive, albeit more questionable, patch than D15637
Should this go in stable, or test it a bit more and then put it in stable?

  • Lyx menu behaves fine now (the title bar button is still somewhat borked by Lyx sends menu updates a gazillion times)
  • Krita menu behaves fine now
  • Thunderbird menu behaves fine now
  • systray stuff seems to work fine

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.Oct 18 2018, 11:03 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 18 2018, 11:03 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Oct 18 2018, 11:03 AM
davidedmundson accepted this revision.Nov 19 2018, 9:05 AM
This revision is now accepted and ready to land.Nov 19 2018, 9:05 AM
This revision was automatically updated to reflect the committed changes.