Fix issue detected by Coverity, StatsDialog::mStatistics was not initialized in the constructor
This commit is contained in:
parent
f7514fcd2c
commit
ecc84ee027
|
@ -30,7 +30,8 @@
|
||||||
#include "checkstatistics.h"
|
#include "checkstatistics.h"
|
||||||
|
|
||||||
StatsDialog::StatsDialog(QWidget *parent)
|
StatsDialog::StatsDialog(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent),
|
||||||
|
mStatistics(nullptr)
|
||||||
{
|
{
|
||||||
mUI.setupUi(this);
|
mUI.setupUi(this);
|
||||||
|
|
||||||
|
@ -281,7 +282,7 @@ void StatsDialog::copyToClipboard()
|
||||||
|
|
||||||
void StatsDialog::setStatistics(const CheckStatistics *stats)
|
void StatsDialog::setStatistics(const CheckStatistics *stats)
|
||||||
{
|
{
|
||||||
mStatistics = const_cast<CheckStatistics*>(stats);
|
mStatistics = stats;
|
||||||
mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowErrors)));
|
mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowErrors)));
|
||||||
mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowWarnings)));
|
mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowWarnings)));
|
||||||
mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowStyle)));
|
mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowStyle)));
|
||||||
|
|
|
@ -68,7 +68,7 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::StatsDialog mUI;
|
Ui::StatsDialog mUI;
|
||||||
CheckStatistics *mStatistics;
|
const CheckStatistics *mStatistics;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
Loading…
Reference in New Issue