forked from qt-creator/qt-creator
TextEditor: move rename symbol action to text editor
Task-number: QTCREATORBUG-21578 Change-Id: I9a873dcd38bacb2287c45973b6be0091c3eb9480 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -162,10 +162,7 @@ QmlJSEditorPluginPrivate::QmlJSEditorPluginPrivate()
|
||||
contextMenu->addAction(cmd);
|
||||
qmlToolsMenu->addAction(cmd);
|
||||
|
||||
QAction *renameUsagesAction = new QAction(QmlJSEditorPlugin::tr("Rename Symbol Under Cursor"), this);
|
||||
cmd = ActionManager::registerAction(renameUsagesAction, "QmlJSEditor.RenameUsages", context);
|
||||
cmd->setDefaultKeySequence(QKeySequence(QmlJSEditorPlugin::tr("Ctrl+Shift+R")));
|
||||
connect(renameUsagesAction, &QAction::triggered, this, &QmlJSEditorPluginPrivate::renameUsages);
|
||||
cmd = ActionManager::command(TextEditor::Constants::RENAME_SYMBOL);
|
||||
contextMenu->addAction(cmd);
|
||||
qmlToolsMenu->addAction(cmd);
|
||||
|
||||
@@ -247,7 +244,7 @@ QuickToolBar *QmlJSEditorPlugin::quickToolBar()
|
||||
void QmlJSEditorPluginPrivate::renameUsages()
|
||||
{
|
||||
if (auto editor = qobject_cast<QmlJSEditorWidget*>(EditorManager::currentEditor()->widget()))
|
||||
editor->renameUsages();
|
||||
editor->renameSymbolUnderCursor();
|
||||
}
|
||||
|
||||
void QmlJSEditorPluginPrivate::reformatFile()
|
||||
|
||||
Reference in New Issue
Block a user