diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index aa0477da1a7..94c2f12e2ac 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -126,31 +126,6 @@ namespace { bool semanticHighlighterDisabled = qstrcmp(qVersion(), "4.7.0") == 0; } -static QList createSelections(QTextDocument *document, - const QList &msgs, - const QTextCharFormat &format) -{ - QList selections; - - foreach (const Document::DiagnosticMessage &m, msgs) { - const int pos = document->findBlockByNumber(m.line() - 1).position() + m.column() - 1; - if (pos < 0) - continue; - - QTextCursor cursor(document); - cursor.setPosition(pos); - cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, m.length()); - - QTextEdit::ExtraSelection sel; - sel.cursor = cursor; - sel.format = format; - sel.format.setToolTip(m.text()); - selections.append(sel); - } - - return selections; -} - namespace { class OverviewTreeView : public QTreeView @@ -1844,14 +1819,6 @@ void CPPEditorWidget::updateSemanticInfo(const SemanticInfo &semanticInfo) } if (m_lastSemanticInfo.forced || previousSemanticInfo.revision != semanticInfo.revision) { - QTextCharFormat diagnosticMessageFormat; - diagnosticMessageFormat.setUnderlineColor(Qt::darkYellow); // ### hardcoded - diagnosticMessageFormat.setUnderlineStyle(QTextCharFormat::WaveUnderline); // ### hardcoded - - setExtraSelections(UndefinedSymbolSelection, createSelections(document(), - semanticInfo.diagnosticMessages, - diagnosticMessageFormat)); - m_highlighter.cancel(); if (! semanticHighlighterDisabled && semanticInfo.doc) { @@ -2076,7 +2043,6 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source) && m_lastSemanticInfo.doc->fileName() == source.fileName) { semanticInfo.snapshot = m_lastSemanticInfo.snapshot; // ### TODO: use the new snapshot. semanticInfo.doc = m_lastSemanticInfo.doc; - semanticInfo.diagnosticMessages = m_lastSemanticInfo.diagnosticMessages; semanticInfo.objcKeywords = m_lastSemanticInfo.objcKeywords; } m_mutex.unlock(); diff --git a/src/plugins/cppeditor/cppsemanticinfo.h b/src/plugins/cppeditor/cppsemanticinfo.h index 01d80d30c01..3f8cd1d57fd 100644 --- a/src/plugins/cppeditor/cppsemanticinfo.h +++ b/src/plugins/cppeditor/cppsemanticinfo.h @@ -68,7 +68,6 @@ public: CPlusPlus::Document::Ptr doc; LocalUseMap localUses; QList objcKeywords; - QList diagnosticMessages; }; } // namespace Internal