Review Request 123746: Workaround DBusMenuQt's design

David Edmundson david at davidedmundson.co.uk
Wed May 13 01:39:09 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123746/
-----------------------------------------------------------

Review request for Plasma.


Repository: plasma-workspace


Description (updated)
-------

DBusMenuImporter by default connects QMenu::aboutToShow to a private
slot slotMenuAboutToShow,
in this slot it reloads the menu befre it gets shown
because the menu shows just after aboutToShow() returns DBusMenuQt in
it's infinite wisdom spawns a new event loop to
block the QMenu processing till we get the network reply

Not only is this rather pointless as all uses in Plamsa calls
updateMenu() before showing, so we fetch the menu twice
it also leads to all sorts of crazy crashes as when we process all other
events we might delete the menu from within QMenu emitting aboutToShow()
which is a very unexpected thing to do as QMenu::popup ends up with 'this' being destroyed halfway through it's
frame.

BUG: 343971
BUG: 345838
BUG: 345933


Ideal fix is in DBusMenuQt, and I /hate/ doing workarounds, but I can't see how to solve it without *significantly* changing the API.


Diffs (updated)
-----

  dataengines/statusnotifieritem/statusnotifieritemsource.cpp b6a50279c01076e7242afaf93d1769348ba031ba 

Diff: https://git.reviewboard.kde.org/r/123746/diff/


Testing (updated)
-------

Opened steam
closed steam from menu
quickly click on the SNI before it exits.
Used to crash. Now doesn't.


Thanks,

David Edmundson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150513/9830f09e/attachment.html>


More information about the Plasma-devel mailing list