ui: display fatal errors

* added ErrorCountInfo to incorporate reporting of fatal errors during code analysis.
This commit is contained in:
malte_langkabel
2016-03-02 10:53:04 +01:00
parent 4425b39ea1
commit 2ebfbbf88e
21 changed files with 105 additions and 213 deletions
+5 -3
View File
@@ -64,11 +64,13 @@ void QtStatusBar::setText(const std::string& text, bool isError, bool showLoader
m_text.setText(text.c_str());
}
void QtStatusBar::setErrorCount(size_t count)
void QtStatusBar::setErrorCount(ErrorCountInfo errorCount)
{
if (count > 0)
if (errorCount.total > 0)
{
m_errorButton.setText(QString::number(count) + " error(s)");
m_errorButton.setText(
QString::number(errorCount.total) + " error" + (errorCount.total > 1 ? "s" : "") +
(errorCount.fatal > 0 ? "(" + QString::number(errorCount.fatal) + " fatal)" : ""));
m_errorButton.show();
}
else
+3 -1
View File
@@ -7,6 +7,8 @@
#include <QLabel>
#include <QStatusBar>
#include "data/ErrorCountInfo.h"
class QtStatusBar
: public QStatusBar
{
@@ -17,7 +19,7 @@ public:
virtual ~QtStatusBar(void);
void setText(const std::string& text, bool isError, bool showLoader);
void setErrorCount(size_t count);
void setErrorCount(ErrorCountInfo errorCount);
private slots:
void showErrors();