diff options
author | David Schulz <david.schulz@qt.io> | 2020-05-06 07:30:33 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2020-05-12 04:28:19 +0000 |
commit | 3559af69db03529422443ff0cf35884a2d7e2511 (patch) | |
tree | 33267bd3aa8446362028bbdf0eff6fcce2dd2eae /src/plugins/texteditor/texteditoractionhandler.cpp | |
parent | a9aa5612345bcfae9a5562e135dec9de8c3b8a8f (diff) |
TextEditor: move rename symbol action to text editor
Task-number: QTCREATORBUG-21578
Change-Id: I9a873dcd38bacb2287c45973b6be0091c3eb9480
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/texteditor/texteditoractionhandler.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditoractionhandler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 67d5898509..1077417859 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -182,6 +182,7 @@ public: QAction *m_followSymbolAction = nullptr; QAction *m_followSymbolInNextSplitAction = nullptr; QAction *m_findUsageAction = nullptr; + QAction *m_renameSymbolAction = nullptr; QAction *m_jumpToFileAction = nullptr; QAction *m_jumpToFileInNextSplitAction = nullptr; QList<QAction *> m_modifyingActions; @@ -285,6 +286,9 @@ void TextEditorActionHandlerPrivate::createActions() m_findUsageAction = registerAction(FIND_USAGES, [] (TextEditorWidget *w) { w->findUsages(); }, true, tr("Find References to Symbol Under Cursor"), QKeySequence(tr("Ctrl+Shift+U"))); + m_renameSymbolAction = registerAction(RENAME_SYMBOL, + [] (TextEditorWidget *w) { w->renameSymbolUnderCursor(); }, true, tr("Rename Symbol Under Cursor"), + QKeySequence(tr("Ctrl+Shift+R"))); m_jumpToFileAction = registerAction(JUMP_TO_FILE_UNDER_CURSOR, [] (TextEditorWidget *w) { w->openLinkUnderCursor(); }, true, tr("Jump to File Under Cursor"), QKeySequence(Qt::Key_F2)); @@ -519,6 +523,7 @@ void TextEditorActionHandlerPrivate::createActions() m_jumpToFileAction->setEnabled(m_optionalActions & TextEditorActionHandler::JumpToFileUnderCursor); m_jumpToFileInNextSplitAction->setEnabled(m_optionalActions & TextEditorActionHandler::JumpToFileUnderCursor); m_unfoldAllAction->setEnabled(m_optionalActions & TextEditorActionHandler::UnCollapseAll); + m_renameSymbolAction->setEnabled(m_optionalActions & TextEditorActionHandler::RenameSymbol); } void TextEditorActionHandlerPrivate::updateActions() |