From 5ed4c7f3ea963b472b2c7560d6e92e3509511b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 28 Jul 2017 05:23:25 +0200 Subject: [PATCH] GUI: Rename methods in CheckStatistics --- gui/checkstatistics.cpp | 8 +++---- gui/checkstatistics.h | 6 +++--- gui/resultsview.cpp | 4 ++-- gui/statsdialog.cpp | 48 ++++++++++++++++++++--------------------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/gui/checkstatistics.cpp b/gui/checkstatistics.cpp index 4745d591f..785463975 100644 --- a/gui/checkstatistics.cpp +++ b/gui/checkstatistics.cpp @@ -22,10 +22,10 @@ CheckStatistics::CheckStatistics(QObject *parent) : QObject(parent) { - Clear(); + clear(); } -void CheckStatistics::AddItem(ShowTypes::ShowType type) +void CheckStatistics::addItem(ShowTypes::ShowType type) { switch (type) { case ShowTypes::ShowStyle: @@ -53,7 +53,7 @@ void CheckStatistics::AddItem(ShowTypes::ShowType type) } } -void CheckStatistics::Clear() +void CheckStatistics::clear() { mStyle = 0; mWarning = 0; @@ -63,7 +63,7 @@ void CheckStatistics::Clear() mError = 0; } -unsigned CheckStatistics::GetCount(ShowTypes::ShowType type) const +unsigned CheckStatistics::getCount(ShowTypes::ShowType type) const { switch (type) { case ShowTypes::ShowStyle: diff --git a/gui/checkstatistics.h b/gui/checkstatistics.h index c6e979fc6..7cc55193f 100644 --- a/gui/checkstatistics.h +++ b/gui/checkstatistics.h @@ -37,13 +37,13 @@ public: * * @param type Type of the item to add. */ - void AddItem(ShowTypes::ShowType type); + void addItem(ShowTypes::ShowType type); /** * @brief Clear the statistics. * */ - void Clear(); + void clear(); /** * @brief Return statistics for given type. @@ -51,7 +51,7 @@ public: * @param type Type for which the statistics are returned. * @return Number of items of given type. */ - unsigned GetCount(ShowTypes::ShowType type) const; + unsigned getCount(ShowTypes::ShowType type) const; private: unsigned mStyle; diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index c92ae0b5d..9779f0a75 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -78,7 +78,7 @@ void ResultsView::Clear(bool results) mUI.mDetails->setText(""); - mStatistics->Clear(); + mStatistics->clear(); //Clear the progressbar mUI.mProgress->setMaximum(PROGRESS_MAX); @@ -106,7 +106,7 @@ void ResultsView::Error(const ErrorItem &item) { if (mUI.mTree->AddErrorItem(item)) { emit GotResults(); - mStatistics->AddItem(ShowTypes::SeverityToShowType(item.severity)); + mStatistics->addItem(ShowTypes::SeverityToShowType(item.severity)); } } diff --git a/gui/statsdialog.cpp b/gui/statsdialog.cpp index cc9105412..3e1f3df15 100644 --- a/gui/statsdialog.cpp +++ b/gui/statsdialog.cpp @@ -107,17 +107,17 @@ void StatsDialog::PDFexport() .arg(tr("Statistics")) .arg(QDate::currentDate().toString("dd.MM.yyyy")) .arg(tr("Errors")) - .arg(mStatistics->GetCount(ShowTypes::ShowErrors)) + .arg(mStatistics->getCount(ShowTypes::ShowErrors)) .arg(tr("Warnings")) - .arg(mStatistics->GetCount(ShowTypes::ShowWarnings)) + .arg(mStatistics->getCount(ShowTypes::ShowWarnings)) .arg(tr("Style warnings")) - .arg(mStatistics->GetCount(ShowTypes::ShowStyle)) + .arg(mStatistics->getCount(ShowTypes::ShowStyle)) .arg(tr("Portability warnings")) - .arg(mStatistics->GetCount(ShowTypes::ShowPortability)) + .arg(mStatistics->getCount(ShowTypes::ShowPortability)) .arg(tr("Performance warnings")) - .arg(mStatistics->GetCount(ShowTypes::ShowPerformance)) + .arg(mStatistics->getCount(ShowTypes::ShowPerformance)) .arg(tr("Information messages")) - .arg(mStatistics->GetCount(ShowTypes::ShowInformation)); + .arg(mStatistics->getCount(ShowTypes::ShowInformation)); QString fileName = QFileDialog::getSaveFileName((QWidget*)0, tr("Export PDF"), QString(), "*.pdf"); if (QFileInfo(fileName).suffix().isEmpty()) { @@ -199,17 +199,17 @@ void StatsDialog::copyToClipboard() ) .arg(stats) .arg(errors) - .arg(mStatistics->GetCount(ShowTypes::ShowErrors)) + .arg(mStatistics->getCount(ShowTypes::ShowErrors)) .arg(warnings) - .arg(mStatistics->GetCount(ShowTypes::ShowWarnings)) + .arg(mStatistics->getCount(ShowTypes::ShowWarnings)) .arg(style) - .arg(mStatistics->GetCount(ShowTypes::ShowStyle)) + .arg(mStatistics->getCount(ShowTypes::ShowStyle)) .arg(portability) - .arg(mStatistics->GetCount(ShowTypes::ShowPortability)) + .arg(mStatistics->getCount(ShowTypes::ShowPortability)) .arg(performance) - .arg(mStatistics->GetCount(ShowTypes::ShowPerformance)) + .arg(mStatistics->getCount(ShowTypes::ShowPerformance)) .arg(information) - .arg(mStatistics->GetCount(ShowTypes::ShowInformation)); + .arg(mStatistics->getCount(ShowTypes::ShowInformation)); const QString textSummary = settings + previous + statistics; @@ -261,17 +261,17 @@ void StatsDialog::copyToClipboard() ) .arg(stats) .arg(errors) - .arg(mStatistics->GetCount(ShowTypes::ShowErrors)) + .arg(mStatistics->getCount(ShowTypes::ShowErrors)) .arg(warnings) - .arg(mStatistics->GetCount(ShowTypes::ShowWarnings)) + .arg(mStatistics->getCount(ShowTypes::ShowWarnings)) .arg(style) - .arg(mStatistics->GetCount(ShowTypes::ShowStyle)) + .arg(mStatistics->getCount(ShowTypes::ShowStyle)) .arg(portability) - .arg(mStatistics->GetCount(ShowTypes::ShowPortability)) + .arg(mStatistics->getCount(ShowTypes::ShowPortability)) .arg(performance) - .arg(mStatistics->GetCount(ShowTypes::ShowPerformance)) + .arg(mStatistics->getCount(ShowTypes::ShowPerformance)) .arg(information) - .arg(mStatistics->GetCount(ShowTypes::ShowInformation)); + .arg(mStatistics->getCount(ShowTypes::ShowInformation)); const QString htmlSummary = htmlSettings + htmlPrevious + htmlStatistics; @@ -285,10 +285,10 @@ void StatsDialog::copyToClipboard() void StatsDialog::setStatistics(const CheckStatistics *stats) { mStatistics = const_cast(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))); - mUI.mLblPortability->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPortability))); - mUI.mLblPerformance->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPerformance))); - mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowInformation))); + 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))); + mUI.mLblPortability->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPortability))); + mUI.mLblPerformance->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPerformance))); + mUI.mLblInformation->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowInformation))); }