From dd54cc6a7a91a2be18de8b8a6e516d81c84f910d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com> Date: Wed, 11 Feb 2009 14:42:23 +0100 Subject: [PATCH] Don't remove syntax errors on each document change Especially when several error markers exist, the flashing this causes while editing isn't really nice. Reviewed-by: Roberto Raggi --- src/plugins/cpptools/cppmodelmanager.cpp | 2 -- src/plugins/cpptools/cppmodelmanager.h | 4 ---- src/plugins/cpptools/cpptoolseditorsupport.cpp | 4 ---- 3 files changed, 10 deletions(-) diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index b2b9c3ee096..00db6d0640d 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -717,8 +717,6 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc) continue; else if (lines.contains(m.line())) continue; - //else if (lines.size() == MAX_SELECTION_COUNT) - //break; // we're done. lines.insert(m.line()); diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h index 4713c29d61b..fb645ffe8f3 100644 --- a/src/plugins/cpptools/cppmodelmanager.h +++ b/src/plugins/cpptools/cppmodelmanager.h @@ -168,10 +168,6 @@ private: mutable QMutex mutex; - enum { - MAX_SELECTION_COUNT = 5 - }; - struct Editor { QPointer<TextEditor::BaseTextEditor> widget; QList<QTextEdit::ExtraSelection> selections; diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index ab6fe3532cc..a1688e7ca09 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -91,10 +91,6 @@ void CppEditorSupport::updateDocument() const QList<QTextEdit::ExtraSelection> selections = edit->extraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection); - if (! selections.isEmpty()) - edit->setExtraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection, - QList<QTextEdit::ExtraSelection>()); - _modelManager->stopEditorSelectionsUpdate(); } -- GitLab