forked from qt-creator/qt-creator
TextEditor: add convenience function to clear additional highlights
Change-Id: Ie3cf6e7f9fb37f3e2270abaf5fca412e7a4a40da Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -180,8 +180,7 @@ void CppEditorDocument::applyFontSettings()
|
||||
// Clear all additional formats since they may have changed
|
||||
QTextBlock b = document()->firstBlock();
|
||||
while (b.isValid()) {
|
||||
QVector<QTextLayout::FormatRange> noFormats;
|
||||
highlighter->setExtraFormats(b, noFormats);
|
||||
highlighter->clearExtraFormats(b);
|
||||
b = b.next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user