diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index c46217213..a2722996f 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -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(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))); diff --git a/gui/statsdialog.h b/gui/statsdialog.h index cbc4fde42..91df55234 100644 --- a/gui/statsdialog.h +++ b/gui/statsdialog.h @@ -68,7 +68,7 @@ private slots: private: Ui::StatsDialog mUI; - CheckStatistics *mStatistics; + const CheckStatistics *mStatistics; }; /// @}