Skip to content

Commit 5ed4c7f

Browse files
committed
GUI: Rename methods in CheckStatistics
1 parent 24ce429 commit 5ed4c7f

4 files changed

Lines changed: 33 additions & 33 deletions

File tree

gui/checkstatistics.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
CheckStatistics::CheckStatistics(QObject *parent)
2323
: QObject(parent)
2424
{
25-
Clear();
25+
clear();
2626
}
2727

28-
void CheckStatistics::AddItem(ShowTypes::ShowType type)
28+
void CheckStatistics::addItem(ShowTypes::ShowType type)
2929
{
3030
switch (type) {
3131
case ShowTypes::ShowStyle:
@@ -53,7 +53,7 @@ void CheckStatistics::AddItem(ShowTypes::ShowType type)
5353
}
5454
}
5555

56-
void CheckStatistics::Clear()
56+
void CheckStatistics::clear()
5757
{
5858
mStyle = 0;
5959
mWarning = 0;
@@ -63,7 +63,7 @@ void CheckStatistics::Clear()
6363
mError = 0;
6464
}
6565

66-
unsigned CheckStatistics::GetCount(ShowTypes::ShowType type) const
66+
unsigned CheckStatistics::getCount(ShowTypes::ShowType type) const
6767
{
6868
switch (type) {
6969
case ShowTypes::ShowStyle:

gui/checkstatistics.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ class CheckStatistics : public QObject {
3737
*
3838
* @param type Type of the item to add.
3939
*/
40-
void AddItem(ShowTypes::ShowType type);
40+
void addItem(ShowTypes::ShowType type);
4141

4242
/**
4343
* @brief Clear the statistics.
4444
*
4545
*/
46-
void Clear();
46+
void clear();
4747

4848
/**
4949
* @brief Return statistics for given type.
5050
*
5151
* @param type Type for which the statistics are returned.
5252
* @return Number of items of given type.
5353
*/
54-
unsigned GetCount(ShowTypes::ShowType type) const;
54+
unsigned getCount(ShowTypes::ShowType type) const;
5555

5656
private:
5757
unsigned mStyle;

gui/resultsview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void ResultsView::Clear(bool results)
7878

7979
mUI.mDetails->setText("");
8080

81-
mStatistics->Clear();
81+
mStatistics->clear();
8282

8383
//Clear the progressbar
8484
mUI.mProgress->setMaximum(PROGRESS_MAX);
@@ -106,7 +106,7 @@ void ResultsView::Error(const ErrorItem &item)
106106
{
107107
if (mUI.mTree->AddErrorItem(item)) {
108108
emit GotResults();
109-
mStatistics->AddItem(ShowTypes::SeverityToShowType(item.severity));
109+
mStatistics->addItem(ShowTypes::SeverityToShowType(item.severity));
110110
}
111111
}
112112

gui/statsdialog.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@ void StatsDialog::PDFexport()
107107
.arg(tr("Statistics"))
108108
.arg(QDate::currentDate().toString("dd.MM.yyyy"))
109109
.arg(tr("Errors"))
110-
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
110+
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
111111
.arg(tr("Warnings"))
112-
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
112+
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
113113
.arg(tr("Style warnings"))
114-
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
114+
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
115115
.arg(tr("Portability warnings"))
116-
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
116+
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
117117
.arg(tr("Performance warnings"))
118-
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
118+
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
119119
.arg(tr("Information messages"))
120-
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
120+
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
121121

122122
QString fileName = QFileDialog::getSaveFileName((QWidget*)0, tr("Export PDF"), QString(), "*.pdf");
123123
if (QFileInfo(fileName).suffix().isEmpty()) {
@@ -199,17 +199,17 @@ void StatsDialog::copyToClipboard()
199199
)
200200
.arg(stats)
201201
.arg(errors)
202-
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
202+
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
203203
.arg(warnings)
204-
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
204+
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
205205
.arg(style)
206-
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
206+
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
207207
.arg(portability)
208-
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
208+
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
209209
.arg(performance)
210-
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
210+
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
211211
.arg(information)
212-
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
212+
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
213213

214214
const QString textSummary = settings + previous + statistics;
215215

@@ -261,17 +261,17 @@ void StatsDialog::copyToClipboard()
261261
)
262262
.arg(stats)
263263
.arg(errors)
264-
.arg(mStatistics->GetCount(ShowTypes::ShowErrors))
264+
.arg(mStatistics->getCount(ShowTypes::ShowErrors))
265265
.arg(warnings)
266-
.arg(mStatistics->GetCount(ShowTypes::ShowWarnings))
266+
.arg(mStatistics->getCount(ShowTypes::ShowWarnings))
267267
.arg(style)
268-
.arg(mStatistics->GetCount(ShowTypes::ShowStyle))
268+
.arg(mStatistics->getCount(ShowTypes::ShowStyle))
269269
.arg(portability)
270-
.arg(mStatistics->GetCount(ShowTypes::ShowPortability))
270+
.arg(mStatistics->getCount(ShowTypes::ShowPortability))
271271
.arg(performance)
272-
.arg(mStatistics->GetCount(ShowTypes::ShowPerformance))
272+
.arg(mStatistics->getCount(ShowTypes::ShowPerformance))
273273
.arg(information)
274-
.arg(mStatistics->GetCount(ShowTypes::ShowInformation));
274+
.arg(mStatistics->getCount(ShowTypes::ShowInformation));
275275

276276
const QString htmlSummary = htmlSettings + htmlPrevious + htmlStatistics;
277277

@@ -285,10 +285,10 @@ void StatsDialog::copyToClipboard()
285285
void StatsDialog::setStatistics(const CheckStatistics *stats)
286286
{
287287
mStatistics = const_cast<CheckStatistics*>(stats);
288-
mUI.mLblErrors->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowErrors)));
289-
mUI.mLblWarnings->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowWarnings)));
290-
mUI.mLblStyle->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowStyle)));
291-
mUI.mLblPortability->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPortability)));
292-
mUI.mLblPerformance->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowPerformance)));
293-
mUI.mLblInformation->setText(QString("%1").arg(stats->GetCount(ShowTypes::ShowInformation)));
288+
mUI.mLblErrors->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowErrors)));
289+
mUI.mLblWarnings->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowWarnings)));
290+
mUI.mLblStyle->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowStyle)));
291+
mUI.mLblPortability->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPortability)));
292+
mUI.mLblPerformance->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowPerformance)));
293+
mUI.mLblInformation->setText(QString("%1").arg(stats->getCount(ShowTypes::ShowInformation)));
294294
}

0 commit comments

Comments
 (0)