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"
|
||||
|
||||
StatsDialog::StatsDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
: QDialog(parent),
|
||||
mStatistics(nullptr)
|
||||
{
|
||||
mUI.setupUi(this);
|
||||
|
||||
|
@ -281,7 +282,7 @@ void StatsDialog::copyToClipboard()
|
|||
|
||||
void StatsDialog::setStatistics(const CheckStatistics *stats)
|
||||
{
|
||||
mStatistics = const_cast<CheckStatistics*>(stats);
|
||||
mStatistics = stats;
|
||||
mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowErrors)));
|
||||
mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowWarnings)));
|
||||
mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowStyle)));
|
||||
|
|
|
@ -68,7 +68,7 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::StatsDialog mUI;
|
||||
CheckStatistics *mStatistics;
|
||||
const CheckStatistics *mStatistics;
|
||||
};
|
||||
|
||||
/// @}
|
||||
|
|
Loading…
Reference in New Issue