Summary: | Find uses keyboard shortcut does nothing | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Jon Mease <jon.mease> |
Component: | contextbrowser | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kfunk |
Priority: | NOR | Keywords: | regression |
Version: | 1.5.1 | ||
Target Milestone: | 1.6.0 | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevplatform/154ee459768d6dc7cd6ebbfb10e8abcf48c3dd98 | Version Fixed In: | |
Sentry Crash Report: |
Description
Jon Mease
2013-11-22 23:18:00 UTC
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 |