From: Roberto Raggi Date: Fri, 26 Nov 2010 13:25:24 +0000 (+0100) Subject: Report only one error message for line (well, at least for now). X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42fbb45b090be0c7068a529cecc6be5f497fd47a;p=qt-creator-jp%2Fqt-creator-jp.git Report only one error message for line (well, at least for now). --- diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp index 26a55b7e1e..cc0e8b4cba 100644 --- a/src/plugins/glsleditor/glsleditor.cpp +++ b/src/plugins/glsleditor/glsleditor.cpp @@ -283,10 +283,15 @@ void GLSLTextEditor::updateDocumentNow() warningFormat.setUnderlineColor(Qt::darkYellow); QList sels; + QSet errors; foreach (const DiagnosticMessage &m, engine.diagnosticMessages()) { if (! m.line()) continue; + else if (errors.contains(m.line())) + continue; + + errors.insert(m.line()); QTextCursor cursor(document()->findBlockByNumber(m.line() - 1)); cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);