forked from qt-creator/qt-creator
ClangTools: Fix fail count displayed in info widget
Fixes: QTCREATORBUG-27330 Change-Id: I853d604c74d37179d56a16b71e1369cdc695c800 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1142,11 +1142,13 @@ void ClangTool::updateForCurrentState()
|
|||||||
m_diagnosticView->setCursor(isRunning ? Qt::BusyCursor : Qt::ArrowCursor);
|
m_diagnosticView->setCursor(isRunning ? Qt::BusyCursor : Qt::ArrowCursor);
|
||||||
|
|
||||||
// Info bar: errors
|
// Info bar: errors
|
||||||
const bool hasErrorText = !m_infoBarWidget->errorText().isEmpty();
|
if (m_filesFailed > 0) {
|
||||||
const bool hasErrors = m_filesFailed > 0;
|
const QString currentErrorText = m_infoBarWidget->errorText();
|
||||||
if (hasErrors && !hasErrorText) {
|
const QString newErrorText = makeLink(tr("Failed to analyze %n file(s).", nullptr,
|
||||||
const QString text = makeLink(tr("Failed to analyze %n file(s).", nullptr, m_filesFailed));
|
m_filesFailed));
|
||||||
m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this] { showOutputPane(); });
|
if (newErrorText != currentErrorText)
|
||||||
|
m_infoBarWidget->setError(InfoBarWidget::Warning, newErrorText,
|
||||||
|
[this] { showOutputPane(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info bar: info
|
// Info bar: info
|
||||||
|
Reference in New Issue
Block a user