diff options
author | David Schulz <david.schulz@qt.io> | 2018-11-28 07:26:14 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2018-11-28 12:29:44 +0000 |
commit | 95cba448a103eb31f285f945913dab44bdea5c68 (patch) | |
tree | 32babb3d0ae77267d07ed0dd5a0ddff6ddb35889 /src/plugins/texteditor/texteditoractionhandler.cpp | |
parent | ccd5955843b08224deb4eebb6355e73b687e569b (diff) |
move find usages to TextEditor
In preperation for supporting find usages by the language client plugin
Task-number: QTCREATORBUG-21577
Change-Id: I7a6da3a9d53478c1d486e0ddc5829c9ea09a2a20
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditoractionhandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index e8599f3836..e34ac19dee 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -181,6 +181,7 @@ public: QAction *m_unindentAction = nullptr; QAction *m_followSymbolAction = nullptr; QAction *m_followSymbolInNextSplitAction = nullptr; + QAction *m_findUsageAction = nullptr; QAction *m_jumpToFileAction = nullptr; QAction *m_jumpToFileInNextSplitAction = nullptr; QList<QAction *> m_modifyingActions; @@ -288,6 +289,9 @@ void TextEditorActionHandlerPrivate::createActions() m_followSymbolInNextSplitAction = registerAction(FOLLOW_SYMBOL_UNDER_CURSOR_IN_NEXT_SPLIT, [] (TextEditorWidget *w) { w->openLinkUnderCursorInNextSplit(); }, true, tr("Follow Symbol Under Cursor in Next Split"), QKeySequence(Utils::HostOsInfo::isMacHost() ? tr("Meta+E, F2") : tr("Ctrl+E, F2"))); + m_findUsageAction = registerAction(FIND_USAGES, + [] (TextEditorWidget *w) { w->findUsages(); }, true, tr("Find References to Symbol Under Cursor"), + QKeySequence(tr("Ctrl+Shift+U"))); m_jumpToFileAction = registerAction(JUMP_TO_FILE_UNDER_CURSOR, [] (TextEditorWidget *w) { w->openLinkUnderCursor(); }, true, tr("Jump to File Under Cursor"), QKeySequence(Qt::Key_F2)); |