CppEditor: Do not highlight C++ and Qt keywords for C

Task-number: QTCREATORBUG-2818
Task-number: QTCREATORBUG-18004
Change-Id: Ibca60a1711c827dd8b4c0486bff3d49b19a61d8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikolai Kosjar
2017-01-16 10:51:13 +01:00
parent 5bc796094a
commit 837cb2e397
4 changed files with 36 additions and 11 deletions

View File

@@ -401,7 +401,15 @@ CppTools::BaseEditorDocumentProcessor *CppEditorDocument::processor()
connect(m_processor.data(), &CppTools::BaseEditorDocumentProcessor::ifdefedOutBlocksUpdated,
this, &CppEditorDocument::ifdefedOutBlocksUpdated);
connect(m_processor.data(), &CppTools::BaseEditorDocumentProcessor::cppDocumentUpdated,
this, &CppEditorDocument::cppDocumentUpdated);
[this](const CPlusPlus::Document::Ptr document) {
// Update syntax highlighter
auto *highlighter = qobject_cast<CppHighlighter *>(syntaxHighlighter());
highlighter->setLanguageFeatures(document->languageFeatures());
// Forward signal
emit cppDocumentUpdated(document);
});
connect(m_processor.data(), &CppTools::BaseEditorDocumentProcessor::semanticInfoUpdated,
this, &CppEditorDocument::semanticInfoUpdated);
}