From 32fff3f6cd41a67703a6e3525d82a852a3393be4 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Wed, 29 Sep 2010 12:14:19 +0200 Subject: [PATCH] Disabled the semantic highlighter when using Qt 4.7.0. --- src/plugins/cppeditor/cppeditor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 9fe55f05a8..e106306e0a 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -102,6 +102,10 @@ enum { using namespace CPlusPlus; using namespace CppEditor::Internal; +namespace { +bool semanticHighlighterDisabled = qstrcmp(qVersion(), "4.7.0") == 0; +} + static QList createSelections(QTextDocument *document, const QList &msgs, const QTextCharFormat &format) @@ -1888,7 +1892,7 @@ void CPPEditor::updateSemanticInfo(const SemanticInfo &semanticInfo) m_highlighter.cancel(); - if (semanticInfo.doc) { + if (! semanticHighlighterDisabled && semanticInfo.doc) { if (Core::EditorManager::instance()->currentEditor() == editableInterface()) { LookupContext context(semanticInfo.doc, semanticInfo.snapshot); CheckSymbols::Future f = CheckSymbols::go(semanticInfo.doc, context); -- 2.11.0