forked from qt-creator/qt-creator
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user