forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -81,7 +81,6 @@ public:
|
||||
Command *addToolAction(QAction *a, Context &context, Id id,
|
||||
ActionContainer *c1, const QString &keySequence);
|
||||
|
||||
void findUsages();
|
||||
void renameUsages();
|
||||
void reformatFile();
|
||||
void showContextPane();
|
||||
@@ -157,10 +156,7 @@ QmlJSEditorPluginPrivate::QmlJSEditorPluginPrivate()
|
||||
contextMenu->addAction(cmd);
|
||||
qmlToolsMenu->addAction(cmd);
|
||||
|
||||
QAction *findUsagesAction = new QAction(QmlJSEditorPlugin::tr("Find Usages"), this);
|
||||
cmd = ActionManager::registerAction(findUsagesAction, Constants::FIND_USAGES, context);
|
||||
cmd->setDefaultKeySequence(QKeySequence(QmlJSEditorPlugin::tr("Ctrl+Shift+U")));
|
||||
connect(findUsagesAction, &QAction::triggered, this, &QmlJSEditorPluginPrivate::findUsages);
|
||||
cmd = ActionManager::command(TextEditor::Constants::FIND_USAGES);
|
||||
contextMenu->addAction(cmd);
|
||||
qmlToolsMenu->addAction(cmd);
|
||||
|
||||
@@ -243,12 +239,6 @@ QuickToolBar *QmlJSEditorPlugin::quickToolBar()
|
||||
return &m_instance->d->m_quickToolBar;
|
||||
}
|
||||
|
||||
void QmlJSEditorPluginPrivate::findUsages()
|
||||
{
|
||||
if (QmlJSEditorWidget *editor = qobject_cast<QmlJSEditorWidget*>(EditorManager::currentEditor()->widget()))
|
||||
editor->findUsages();
|
||||
}
|
||||
|
||||
void QmlJSEditorPluginPrivate::renameUsages()
|
||||
{
|
||||
if (QmlJSEditorWidget *editor = qobject_cast<QmlJSEditorWidget*>(EditorManager::currentEditor()->widget()))
|
||||
|
||||
Reference in New Issue
Block a user