ClangTools: Hide file path items without diagnostics

...in case diagnostics are filtered out.

Change-Id: I8a78f8873577ca80fe5a3d4123f64a9432c0fb7f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-02-06 14:22:09 +01:00
parent e25be3d5ee
commit 9cfc4a68db
5 changed files with 33 additions and 4 deletions

View File

@@ -471,6 +471,13 @@ QList<Diagnostic> ClangTidyClazyTool::read(const QString &filePath,
return readSerializedDiagnostics(filePath, projectRootDir, logFilePath, errorMessage);
}
void ClangTidyClazyTool::onNewDiagnosticsAvailable(const QList<Diagnostic> &diagnostics)
{
ClangTool::onNewDiagnosticsAvailable(diagnostics);
if (!m_diagnosticFilterModel->filterRegExp().pattern().isEmpty())
m_diagnosticFilterModel->invalidateFilter();
}
} // namespace Internal
} // namespace ClangTools