forked from qt-creator/qt-creator
C++: optionally let the highlighter handle ifdefed-out blocks.
Change-Id: I38cc0e55348cac0245d2ab8f3e39c68de76e3e6d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
480f7c09fc
commit
073e5d6632
@@ -969,3 +969,21 @@ void CppModelManager::setExtraDiagnostics(const QString &fileName,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CppModelManager::setIfdefedOutBlocks(const QString &fileName,
|
||||
const QList<TextEditor::BlockRange> &ifdeffedOutBlocks)
|
||||
{
|
||||
QList<CppEditorSupport *> cppEditorSupports;
|
||||
|
||||
{
|
||||
QMutexLocker locker(&m_cppEditorSupportsMutex);
|
||||
cppEditorSupports = m_cppEditorSupports.values();
|
||||
}
|
||||
|
||||
foreach (CppEditorSupport *editorSupport, cppEditorSupports) {
|
||||
if (editorSupport->fileName() == fileName) {
|
||||
editorSupport->setIfdefedOutBlocks(ifdeffedOutBlocks);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user