diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index c28c216138e64bee71e9584b8f2cd1702f3b6b9f..ac6fb48639a779fc4ab3041c93cf29a559b6e01d 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -724,8 +724,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 4713c29d61bb436132da7c080eb46cbac4ca1af3..fb645ffe8f3c4502ed508c529971535c7e626c89 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 ab6fe3532ccfe2fa3e10c6d259a77b61031ee72d..a1688e7ca09d929e038e92fc3f29c9b9438febc8 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(); } diff --git a/src/shared/proparser/proeditormodel.cpp b/src/shared/proparser/proeditormodel.cpp index 787ea76410fec39e44f35b30fcbd33ec56dfb46a..c11e8668e3f5af50219887014405ae8df0371757 100644 --- a/src/shared/proparser/proeditormodel.cpp +++ b/src/shared/proparser/proeditormodel.cpp @@ -923,7 +923,7 @@ QVariant ProScopeFilter::data(const QModelIndex &index, int role) const { bool checkable = m_checkable == ProScopeFilter::Blocks - || m_checkable == ProScopeFilter::Variable && sourceVariable(index); + || (m_checkable == ProScopeFilter::Variable && sourceVariable(index)); if (checkable && role == Qt::CheckStateRole) { QModelIndex srcindex = mapToSource(index);