rjvbb added a comment.
> Please, let's find the root causes and fix things at the base instead of adding such I suck at debugging event-driven code, unfortunately. But even if "we" find a fixable bug in some framework there's still no guarantee that no one will ever run KDevelop against a non-fixed version of that framework. I'll see if a breakpoint in and backtrace from my added if teaches me anything but I have my doubts (and no other ideas). > (even uncommented=unexplained=surprising) That's easy to fix. See the "todo" comment elsewhere in the same file. TBH, I didn't add a comment yet because in itself I see nothing wrong in checking if you're dealing with the active view before you start adding things to a contextmenu. Ultimately the problem lies in having a single contextmenu (the `menu` argument) and a `d->addedContextMenu` per document (view). As I said on the ML, moving `populateContextMenu()` and `addedContextMenu` to a class like KDevelop::MainWindow would solve the issue too without having to rewrite `populateContextMenu()`. There can only be a single contextmenu active at any time, so it would make sense to populate it in a singleton class, no? 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