Convert semantic highlighter to use additional formats

instead of extra selections. This requires a recent
version of Qt 4.7, the beta 2 will not do.

Done-with: Roberto Raggi
This commit is contained in:
mae
2010-07-13 14:37:31 +02:00
parent b421d9c007
commit 72bb7c5c11
7 changed files with 185 additions and 65 deletions

View File

@@ -4063,10 +4063,8 @@ int BaseTextEditor::paragraphSeparatorAboutToBeInserted(QTextCursor &cursor)
while (block.isValid() && ts.onlySpace(block.text()))
block = block.next();
if (block.isValid()
&& ts.indentationColumn(block.text()) > indentation) {
qDebug() << "indentation check failed" << indentation << ts.indentationColumn(block.next().text());
&& ts.indentationColumn(block.text()) > indentation)
return 0;
}
}
int pos = cursor.position();
@@ -4664,7 +4662,6 @@ void BaseTextEditor::maybeClearSomeExtraSelections(const QTextCursor &cursor)
if (cursor.selectionEnd() - cursor.selectionStart() < smallSelectionSize)
return;
d->m_extraSelections[TypeSelection].clear();
d->m_extraSelections[UndefinedSymbolSelection].clear();
d->m_extraSelections[ObjCSelection].clear();
d->m_extraSelections[CodeWarningsSelection].clear();