forked from qt-creator/qt-creator
Force an update of the current editor.
This commit is contained in:
@@ -302,6 +302,9 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
|
||||
this, SLOT(onTaskStarted(QString)));
|
||||
connect(core->progressManager(), SIGNAL(allTasksFinished(QString)),
|
||||
this, SLOT(onAllTasksFinished(QString)));
|
||||
|
||||
connect(core->editorManager(), SIGNAL(currentEditorChanged(Core::IEditor*)), SLOT(currentEditorChanged(Core::IEditor*)));
|
||||
|
||||
readSettings();
|
||||
return true;
|
||||
}
|
||||
@@ -400,4 +403,14 @@ void CppPlugin::onAllTasksFinished(const QString &type)
|
||||
}
|
||||
}
|
||||
|
||||
void CppPlugin::currentEditorChanged(Core::IEditor *editor)
|
||||
{
|
||||
if (! editor)
|
||||
return;
|
||||
|
||||
else if (CPPEditor *textEditor = qobject_cast<CPPEditor *>(editor->widget())) {
|
||||
textEditor->rehighlight(/*force = */ true);
|
||||
}
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN(CppPlugin)
|
||||
|
||||
Reference in New Issue
Block a user