Index: shell/filteredproblemstore.cpp =================================================================== --- shell/filteredproblemstore.cpp +++ shell/filteredproblemstore.cpp @@ -292,6 +292,9 @@ bool FilteredProblemStorePrivate::match(const IProblem::Ptr &problem) const { + if (q->scope() != ProblemScope::BypassScopeFilter && + !q->documents()->get().contains(problem.data()->finalLocation().document)) + return false; if(problem->severity()!=IProblem::NoSeverity) { Index: shell/problemmodel.cpp =================================================================== --- shell/problemmodel.cpp +++ shell/problemmodel.cpp @@ -308,6 +308,9 @@ { Q_ASSERT(thread() == QThread::currentThread()); + if (!features().testFlag(ScopeFilter)) + scope = ProblemScope::BypassScopeFilter; + /// Will trigger signals beginRebuild(), endRebuild() if problems change and are rebuilt d->m_problems->setScope(scope); } Index: shell/problemstore.cpp =================================================================== --- shell/problemstore.cpp +++ shell/problemstore.cpp @@ -153,10 +153,6 @@ { ProblemScope cast_scope = static_cast(scope); - if (cast_scope == BypassScopeFilter) { - return; - } - if (d->m_documents) { if(cast_scope == d->m_documents->getScope()) return; @@ -178,7 +174,7 @@ d->m_documents = new AllProjectSet(this); break; case BypassScopeFilter: - // handled above + d->m_documents = new BypassSet(this); break; } Index: shell/watcheddocumentset.h =================================================================== --- shell/watcheddocumentset.h +++ shell/watcheddocumentset.h @@ -129,6 +129,14 @@ ProblemScope getScope() const override; }; +class BypassSet : public WatchedDocumentSet +{ + Q_OBJECT +public: + explicit BypassSet(QObject* parent); + ProblemScope getScope() const override; +}; + } #endif // KDEVPLATFORM_PLUGIN_WATCHEDDOCUMENTSET_H Index: shell/watcheddocumentset.cpp =================================================================== --- shell/watcheddocumentset.cpp +++ shell/watcheddocumentset.cpp @@ -183,5 +183,14 @@ return AllProjects; } +BypassSet::BypassSet(QObject *parent) + : WatchedDocumentSet(parent) +{ +} + +ProblemScope BypassSet::getScope() const +{ + return BypassScopeFilter; } +}