From: Roberto Raggi Date: Wed, 29 Sep 2010 10:14:19 +0000 (+0200) Subject: Disabled the semantic highlighter when using Qt 4.7.0. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=32fff3f6cd41a67703a6e3525d82a852a3393be4;p=qt-creator-jp%2Fqt-creator-jp.git Disabled the semantic highlighter when using Qt 4.7.0. --- 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);