Don't waste time rehighlighting all the files opened in Creator.

This commit is contained in:
Roberto Raggi
2010-12-14 15:04:46 +01:00
parent 6e17e7a3ab
commit ea5d923fe0
4 changed files with 15 additions and 4 deletions

View File

@@ -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)