rjvbb reclaimed this revision.
rjvbb added a comment.
This revision now requires changes to proceed.


  Re-opening because I found an actual flaw in KDevelop after noticing that 
context menu duplication still occurred when only the active view receives the 
aboutToShowContextMenu signal.
  
  The `addedContextMenu` member exists because `"we want to remove the added 
stuff when the menu hides"`. This should of course read "when the menu reopens 
in again, possibly in a different view".
  The flaw here is that the design forgets that the context menu instance is 
shared among views. It expects `d->addedContextMenu` to exist and contain the 
QMenu added by a previous view, but this cannot be the case in the current 
implementation where the variable is only allocated when the menu is first 
opened in a given view.
  If the `addedContextMenu` is to be removed in JIT-fashion before reopening 
the context menu, it should be a static variable.
  
  Fix upcoming.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D16882

To: rjvbb, #kdevelop, kossebau
Cc: kossebau, kde-frameworks-devel, kdevelop-devel, glebaccon, antismap, 
iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd

Reply via email to