Bug 401138

Summary: KDevelop showing duplicate contextmenu items
Product: [Applications] kdevelop Reporter: RJVB <rjvbertin>
Component: UI: IDEAlAssignee: kdevelop-bugs-null
Status: RESOLVED WORKSFORME    
Severity: normal CC: igorkuo, jurajoravec
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description RJVB 2018-11-17 14:55:46 UTC
SUMMARY
Document context menu actions are added multiple times after https://phabricator.kde.org/R39:3f0c617e22ab5d2ae016ef7858c6f451f9cf0ad0

STEPS TO REPRODUCE
1. install KTextEditor from git/master
2. Open a KDevelop session that has multiple documents open
3. Open a context menu; notice how the actions below the Bookmarks submenu are shown once only

OBSERVED RESULT
4. Switch to another document, open the context menu, notice how these actions now show up twice
5. Switch to a third document, open the context menu, notice how the number of duplications increased.

ADDITIONAL INFORMATION
This is no longer dependent on having the Kate CTags plugin loaded as in my earlier reports. Instead, it is due (I think) to a design flaw in KDevelop: the QMenu added to the context menu should not be private to individual views but instead be shared among them. That is the only way the added menu actions can be removed (before adding a refreshed list of actions) when the menu is about to be reopened in another view.

Proposed fix: https://phabricator.kde.org/D16882
Comment 1 Friedrich W. H. Kossebau 2019-07-02 14:46:45 UTC
*** Bug 409340 has been marked as a duplicate of this bug. ***
Comment 2 Igor Kushnir 2024-11-05 09:47:26 UTC
Cannot reproduce in latest KDevelop master (between 6.0 and 6.1) even with the CTags plugin enabled.