forked from qt-creator/qt-creator
ClangTools: Do not show text marks for suppressed diagnostics
Do not generate marks for automatic runs and hide them for the explicitly invoked analyzes. Change-Id: Ic48e7b13c424c51e7e1759c588c94bbd45e6d1bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -629,8 +629,10 @@ bool DiagnosticFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
||||
const Diagnostic &diag = diagnosticItem->diagnostic();
|
||||
|
||||
// Filtered out?
|
||||
if (m_filterOptions && !m_filterOptions->checks.contains(diag.name))
|
||||
if (m_filterOptions && !m_filterOptions->checks.contains(diag.name)) {
|
||||
diagnosticItem->textMark()->setVisible(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Explicitly suppressed?
|
||||
foreach (const SuppressedDiagnostic &d, m_suppressedDiagnostics) {
|
||||
@@ -640,10 +642,12 @@ bool DiagnosticFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
||||
QFileInfo fi(filePath);
|
||||
if (fi.isRelative())
|
||||
filePath = m_lastProjectDirectory.toString() + QLatin1Char('/') + filePath;
|
||||
if (filePath == diag.location.filePath)
|
||||
if (filePath == diag.location.filePath) {
|
||||
diagnosticItem->textMark()->setVisible(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
diagnosticItem->textMark()->setVisible(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user