Skip to content

Commit 73cbf61

Browse files
committed
GUI: Renamed methods in ResultsView
1 parent 090062b commit 73cbf61

3 files changed

Lines changed: 100 additions & 102 deletions

File tree

gui/mainwindow.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) :
6666
{
6767
mUI.setupUi(this);
6868
mThread = new ThreadHandler(this);
69-
mUI.mResults->Initialize(mSettings, mApplications, mThread);
69+
mUI.mResults->initialize(mSettings, mApplications, mThread);
7070

7171
// Filter timer to delay filtering results slightly while typing
7272
mFilterTimer = new QTimer(this);
@@ -256,7 +256,7 @@ void MainWindow::loadSettings()
256256
mSettings->value(SETTINGS_WINDOW_HEIGHT, 600).toInt());
257257
}
258258

259-
ShowTypes *types = mUI.mResults->GetShowTypes();
259+
ShowTypes *types = mUI.mResults->getShowTypes();
260260
mUI.mActionShowStyle->setChecked(types->isShown(ShowTypes::ShowStyle));
261261
mUI.mActionShowErrors->setChecked(types->isShown(ShowTypes::ShowErrors));
262262
mUI.mActionShowWarnings->setChecked(types->isShown(ShowTypes::ShowWarnings));
@@ -352,7 +352,7 @@ void MainWindow::saveSettings() const
352352
mApplications->saveSettings();
353353

354354
mSettings->setValue(SETTINGS_LANGUAGE, mTranslation->GetCurrentLanguage());
355-
mUI.mResults->SaveSettings(mSettings);
355+
mUI.mResults->saveSettings(mSettings);
356356
}
357357

358358
void MainWindow::doCheckProject(ImportProject p)
@@ -370,18 +370,18 @@ void MainWindow::doCheckProject(ImportProject p)
370370
enableProjectActions(false);
371371
}
372372

373-
mUI.mResults->Clear(true);
373+
mUI.mResults->clear(true);
374374
mThread->ClearFiles();
375375

376-
mUI.mResults->CheckingStarted(p.fileSettings.size());
376+
mUI.mResults->checkingStarted(p.fileSettings.size());
377377

378378
QDir inf(mCurrentDirectory);
379379
const QString checkPath = inf.canonicalPath();
380380
setPath(SETTINGS_LAST_CHECK_PATH, checkPath);
381381

382382
checkLockDownUI(); // lock UI while checking
383383

384-
mUI.mResults->SetCheckDirectory(checkPath);
384+
mUI.mResults->setCheckDirectory(checkPath);
385385
Settings checkSettings = getCppcheckSettings();
386386
checkSettings.force = false;
387387

@@ -415,7 +415,7 @@ void MainWindow::doCheckFiles(const QStringList &files)
415415
}
416416
QStringList fileNames = pathList.getFileList();
417417

418-
mUI.mResults->Clear(true);
418+
mUI.mResults->clear(true);
419419
mThread->ClearFiles();
420420

421421
if (fileNames.isEmpty()) {
@@ -428,7 +428,7 @@ void MainWindow::doCheckFiles(const QStringList &files)
428428
return;
429429
}
430430

431-
mUI.mResults->CheckingStarted(fileNames.count());
431+
mUI.mResults->checkingStarted(fileNames.count());
432432

433433
mThread->SetFiles(fileNames);
434434
QDir inf(mCurrentDirectory);
@@ -437,7 +437,7 @@ void MainWindow::doCheckFiles(const QStringList &files)
437437

438438
checkLockDownUI(); // lock UI while checking
439439

440-
mUI.mResults->SetCheckDirectory(checkPath);
440+
mUI.mResults->setCheckDirectory(checkPath);
441441
Settings checkSettings = getCppcheckSettings();
442442

443443
if (mProject)
@@ -475,7 +475,7 @@ void MainWindow::checkCode(const QString& code, const QString& filename)
475475
// Check
476476
checkLockDownUI();
477477
clearResults();
478-
mUI.mResults->CheckingStarted(1);
478+
mUI.mResults->checkingStarted(1);
479479
cppcheck.check(filename.toStdString(), code.toStdString());
480480
checkDone();
481481
}
@@ -833,7 +833,7 @@ void MainWindow::checkDone()
833833
return;
834834
}
835835

836-
mUI.mResults->CheckingFinished();
836+
mUI.mResults->checkingFinished();
837837
enableCheckButtons(true);
838838
mUI.mActionSettings->setEnabled(true);
839839
mUI.mActionOpenXML->setEnabled(true);
@@ -852,7 +852,7 @@ void MainWindow::checkDone()
852852
if (mScratchPad)
853853
mScratchPad->setEnabled(true);
854854

855-
if (mUI.mResults->HasResults()) {
855+
if (mUI.mResults->hasResults()) {
856856
mUI.mActionClearResults->setEnabled(true);
857857
mUI.mActionSave->setEnabled(true);
858858
mUI.mActionPrint->setEnabled(true);
@@ -896,7 +896,7 @@ void MainWindow::programSettings()
896896
SettingsDialog dialog(mApplications, mTranslation, this);
897897
if (dialog.exec() == QDialog::Accepted) {
898898
dialog.SaveSettingValues();
899-
mUI.mResults->UpdateSettings(dialog.ShowFullPath(),
899+
mUI.mResults->updateSettings(dialog.ShowFullPath(),
900900
dialog.SaveFullPath(),
901901
dialog.SaveAllErrors(),
902902
dialog.ShowNoErrorsMessage(),
@@ -925,18 +925,18 @@ void MainWindow::reCheckSelected(QStringList files, bool all)
925925
return;
926926

927927
// Clear details, statistics and progress
928-
mUI.mResults->Clear(false);
928+
mUI.mResults->clear(false);
929929
for (int i = 0; i < files.size(); ++i)
930-
mUI.mResults->ClearRecheckFile(files[i]);
930+
mUI.mResults->clearRecheckFile(files[i]);
931931

932-
mCurrentDirectory = mUI.mResults->GetCheckDirectory();
932+
mCurrentDirectory = mUI.mResults->getCheckDirectory();
933933
FileList pathList;
934934
pathList.addPathList(files);
935935
if (mProject)
936936
pathList.addExcludeList(mProject->getProjectFile()->getExcludedPaths());
937937
QStringList fileNames = pathList.getFileList();
938938
checkLockDownUI(); // lock UI while checking
939-
mUI.mResults->CheckingStarted(fileNames.size());
939+
mUI.mResults->checkingStarted(fileNames.size());
940940
mThread->SetCheckFiles(fileNames);
941941

942942
// Saving last check start time, otherwise unchecked modified files will not be
@@ -954,14 +954,14 @@ void MainWindow::reCheck(bool all)
954954
return;
955955

956956
// Clear details, statistics and progress
957-
mUI.mResults->Clear(all);
957+
mUI.mResults->clear(all);
958958

959959
// Clear results for changed files
960960
for (int i = 0; i < files.size(); ++i)
961-
mUI.mResults->Clear(files[i]);
961+
mUI.mResults->clear(files[i]);
962962

963963
checkLockDownUI(); // lock UI while checking
964-
mUI.mResults->CheckingStarted(files.size());
964+
mUI.mResults->checkingStarted(files.size());
965965

966966
if (mProject)
967967
qDebug() << "Rechecking project file" << mProject->getProjectFile()->getFilename();
@@ -972,7 +972,7 @@ void MainWindow::reCheck(bool all)
972972

973973
void MainWindow::clearResults()
974974
{
975-
mUI.mResults->Clear(true);
975+
mUI.mResults->clear(true);
976976
mUI.mActionClearResults->setEnabled(false);
977977
mUI.mActionSave->setEnabled(false);
978978
mUI.mActionPrint->setEnabled(false);
@@ -981,7 +981,7 @@ void MainWindow::clearResults()
981981

982982
void MainWindow::openResults()
983983
{
984-
if (mUI.mResults->HasResults()) {
984+
if (mUI.mResults->hasResults()) {
985985
QMessageBox msgBox(this);
986986
msgBox.setWindowTitle(tr("Cppcheck"));
987987
const QString msg(tr("Current results will be cleared.\n\n"
@@ -1017,18 +1017,18 @@ void MainWindow::loadResults(const QString selectedFile)
10171017
if (mProject)
10181018
closeProjectFile();
10191019
mIsLogfileLoaded = true;
1020-
mUI.mResults->Clear(true);
1020+
mUI.mResults->clear(true);
10211021
mUI.mActionRecheckModified->setEnabled(false);
10221022
mUI.mActionRecheckAll->setEnabled(false);
1023-
mUI.mResults->ReadErrorsXml(selectedFile);
1023+
mUI.mResults->readErrorsXml(selectedFile);
10241024
setPath(SETTINGS_LAST_RESULT_PATH, selectedFile);
10251025
}
10261026
}
10271027

10281028
void MainWindow::loadResults(const QString selectedFile, const QString sourceDirectory)
10291029
{
10301030
loadResults(selectedFile);
1031-
mUI.mResults->SetCheckDirectory(sourceDirectory);
1031+
mUI.mResults->setCheckDirectory(sourceDirectory);
10321032
}
10331033

10341034
void MainWindow::enableCheckButtons(bool enable)
@@ -1046,32 +1046,32 @@ void MainWindow::enableCheckButtons(bool enable)
10461046

10471047
void MainWindow::showStyle(bool checked)
10481048
{
1049-
mUI.mResults->ShowResults(ShowTypes::ShowStyle, checked);
1049+
mUI.mResults->showResults(ShowTypes::ShowStyle, checked);
10501050
}
10511051

10521052
void MainWindow::showErrors(bool checked)
10531053
{
1054-
mUI.mResults->ShowResults(ShowTypes::ShowErrors, checked);
1054+
mUI.mResults->showResults(ShowTypes::ShowErrors, checked);
10551055
}
10561056

10571057
void MainWindow::showWarnings(bool checked)
10581058
{
1059-
mUI.mResults->ShowResults(ShowTypes::ShowWarnings, checked);
1059+
mUI.mResults->showResults(ShowTypes::ShowWarnings, checked);
10601060
}
10611061

10621062
void MainWindow::showPortability(bool checked)
10631063
{
1064-
mUI.mResults->ShowResults(ShowTypes::ShowPortability, checked);
1064+
mUI.mResults->showResults(ShowTypes::ShowPortability, checked);
10651065
}
10661066

10671067
void MainWindow::showPerformance(bool checked)
10681068
{
1069-
mUI.mResults->ShowResults(ShowTypes::ShowPerformance, checked);
1069+
mUI.mResults->showResults(ShowTypes::ShowPerformance, checked);
10701070
}
10711071

10721072
void MainWindow::showInformation(bool checked)
10731073
{
1074-
mUI.mResults->ShowResults(ShowTypes::ShowInformation, checked);
1074+
mUI.mResults->showResults(ShowTypes::ShowInformation, checked);
10751075
}
10761076

10771077
void MainWindow::checkAll()
@@ -1194,7 +1194,7 @@ void MainWindow::save()
11941194
type = Report::CSV;
11951195
}
11961196

1197-
mUI.mResults->Save(selectedFile, type);
1197+
mUI.mResults->save(selectedFile, type);
11981198
setPath(SETTINGS_LAST_RESULT_PATH, selectedFile);
11991199
}
12001200
}
@@ -1238,7 +1238,7 @@ void MainWindow::setLanguage(const QString &code)
12381238
if (mTranslation->SetLanguage(code)) {
12391239
//Translate everything that is visible here
12401240
mUI.retranslateUi(this);
1241-
mUI.mResults->Translate();
1241+
mUI.mResults->translate();
12421242
delete mLogView;
12431243
mLogView = 0;
12441244
}
@@ -1254,7 +1254,7 @@ void MainWindow::aboutToShowViewMenu()
12541254
void MainWindow::stopChecking()
12551255
{
12561256
mThread->Stop();
1257-
mUI.mResults->DisableProgressbar();
1257+
mUI.mResults->disableProgressbar();
12581258
}
12591259

12601260
void MainWindow::openHelpContents()
@@ -1434,7 +1434,7 @@ void MainWindow::showStatistics()
14341434
statsDialog.setPathSelected(mCurrentDirectory);
14351435
statsDialog.setNumberOfFilesScanned(mThread->GetPreviousFilesCount());
14361436
statsDialog.setScanDuration(mThread->GetPreviousScanDuration() / 1000.0);
1437-
statsDialog.setStatistics(mUI.mResults->GetStatistics());
1437+
statsDialog.setStatistics(mUI.mResults->getStatistics());
14381438

14391439
statsDialog.exec();
14401440
}
@@ -1461,7 +1461,7 @@ void MainWindow::debugError(const ErrorItem &item)
14611461

14621462
void MainWindow::filterResults()
14631463
{
1464-
mUI.mResults->FilterResults(mLineEditFilter->text());
1464+
mUI.mResults->filterResults(mLineEditFilter->text());
14651465
}
14661466

14671467
void MainWindow::enableProjectActions(bool enable)

0 commit comments

Comments
 (0)