forked from qt-creator/qt-creator
Don't waste time rehighlighting all the files opened in Creator.
This commit is contained in:
@@ -241,6 +241,8 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
|
||||
addAutoReleasedObject(new QuickToolBar);
|
||||
addAutoReleasedObject(new Internal::QuickToolBarSettingsPage);
|
||||
|
||||
connect(core->editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)), SLOT(currentEditorChanged(Core::IEditor*)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -340,4 +342,14 @@ void QmlJSEditorPlugin::quickFixNow()
|
||||
}
|
||||
}
|
||||
|
||||
void QmlJSEditorPlugin::currentEditorChanged(Core::IEditor *editor)
|
||||
{
|
||||
if (! editor)
|
||||
return;
|
||||
|
||||
else if (QmlJSTextEditor *textEditor = qobject_cast<QmlJSTextEditor *>(editor->widget())) {
|
||||
textEditor->forceSemanticRehighlight();
|
||||
}
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN(QmlJSEditorPlugin)
|
||||
|
||||
Reference in New Issue
Block a user