When the "Find uses" action is bound to a keystroke (Such as Ctrl+M), executing that keystroke has no effect. Reproducible: Always Steps to Reproduce: 1. Open Settings -> Configure Shortcuts 2. Assign a custom keyboard shortcut to the "Find Uses" action (Such as Ctrl+M) 3. Back in the editor in a C++ file, move the text cursor onto a variable or method. 4. Enter the keystroke configured in step 2. Actual Results: Nothing happens Expected Results: The code browser window should pop open and search for uses of the variable or method under the text cursor. If I hover my mouse cursor over the variable and select "Show uses" from the documentation popup I do get the expected results (the code browser window opens and searches for uses of the variable).
Same for me.
A description of my understanding of the problem and a potential fix are posted here https://git.reviewboard.kde.org/r/114130/.
Git commit 154ee459768d6dc7cd6ebbfb10e8abcf48c3dd98 by Milian Wolff, on behalf of Jon Mease. Committed on 01/12/2013 at 15:04. Pushed by mwolff into branch '1.6'. Fix "Find uses" action when invoked via shortcut. When the "Find uses" action is bound to a keystroke (Such as Ctrl+M), executing that keystroke has no effect even though executing "Find Uses" from the context menu works as expected. Problem: The ContextBrowserPlugin::findUses() function relies on the sender() object being a QAction whose data() is an IndexedDeclaration. The setData() method for this QAction is only called in the ContextBrowserPlugin::contextMenuExtension() function, however this function is not called when the Find Uses action is invoked with a keyboard shortcut. Solution: This patch removes the calls to setData() and data() on the QAction. Instead, I copied the cursorDeclaration() function that is used in quickopenplugin.cpp. This function returns a DeclarationPointer for the item under the cursor and used in place of the prior result of data() on the QAction. This solution fixes the bug, and preserves the past behavior of Find Uses from the context menu and the documentation popup. REVIEW: 114130 M +23 -6 plugins/contextbrowser/contextbrowser.cpp http://commits.kde.org/kdevplatform/154ee459768d6dc7cd6ebbfb10e8abcf48c3dd98