CppEditor: Allow force highlighting if using clang

...so we can rehighlight if it's requested by the editor. This is e.g.
necessary if the font size changes.

Task-number: QTCREATORBUG-11502
Change-Id: I608921899fc37fcf1394db9ff041e6b378196bdd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-03-11 14:00:57 -03:00
parent 18e6be55d7
commit cbf98ba819
3 changed files with 22 additions and 11 deletions

View File

@@ -1591,8 +1591,12 @@ bool CPPEditorWidget::openCppEditorAt(const Link &link, bool inNextSplit)
void CPPEditorWidget::semanticRehighlight(bool force)
{
if (m_modelManager)
m_modelManager->cppEditorSupport(editor())->recalculateSemanticInfoDetached(force);
if (m_modelManager) {
const CppEditorSupport::ForceReason forceReason = force
? CppEditorSupport::ForceDueEditorRequest
: CppEditorSupport::NoForce;
m_modelManager->cppEditorSupport(editor())->recalculateSemanticInfoDetached(forceReason);
}
}
void CPPEditorWidget::highlighterStarted(QFuture<TextEditor::HighlightingResult> *highlighter,