forked from qt-creator/qt-creator
Revert "CppHighlighter: highlight all functions/methods."
This reverts commit e3e67467cfea5934f16a95385761455b0c495a0d Reason is that it shows errors for calls to function-like macros. For example, any use of Q_DISABLE_COPY results in invalid errors. Change-Id: I1fd1473ac5a30da5b9aebf6a3f0f11055bdbe8ad Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
@@ -1151,19 +1151,13 @@ void CppModelManager::updateEditor(Document::Ptr doc)
|
||||
|
||||
QTextCursor c(ed->document()->findBlockByNumber(m.line() - 1));
|
||||
const QString text = c.block().text();
|
||||
if (m.length() > 0 && m.column() + m.length() < (unsigned)text.size()) {
|
||||
int column = m.column() > 0 ? m.column() - 1 : 0;
|
||||
c.setPosition(c.position() + column);
|
||||
c.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, m.length());
|
||||
} else {
|
||||
for (int i = 0; i < text.size(); ++i) {
|
||||
if (! text.at(i).isSpace()) {
|
||||
c.setPosition(c.position() + i);
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < text.size(); ++i) {
|
||||
if (! text.at(i).isSpace()) {
|
||||
c.setPosition(c.position() + i);
|
||||
break;
|
||||
}
|
||||
c.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
|
||||
}
|
||||
c.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
|
||||
sel.cursor = c;
|
||||
sel.format.setToolTip(m.text());
|
||||
e.selections.append(sel);
|
||||
|
||||
Reference in New Issue
Block a user