From 23ed35b1e64f5863ea1372a20b50fe64e222bdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 30 Jul 2017 11:50:08 +0200 Subject: [PATCH] GUI: Renamed methods 'Check' => 'Analyze' --- gui/mainwindow.cpp | 34 +++++++++++++++++----------------- gui/mainwindow.h | 8 ++++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 83ea24dc7..86de001a5 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -249,7 +249,7 @@ void MainWindow::handleCLIParams(const QStringList ¶ms) } else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) { loadResults(params[index],QDir::currentPath()); } else - doCheckFiles(params); + doAnalyzeFiles(params); } void MainWindow::loadSettings() @@ -378,7 +378,7 @@ void MainWindow::saveSettings() const mUI.mResults->saveSettings(mSettings); } -void MainWindow::doCheckProject(ImportProject p) +void MainWindow::doAnalyzeProject(ImportProject p) { clearResults(); @@ -416,12 +416,12 @@ void MainWindow::doCheckProject(ImportProject p) AnalyzerInformation::writeFilesTxt(checkSettings.buildDir, sourcefiles, p.fileSettings); } - //mThread->SetCheckProject(true); + //mThread->SetanalyzeProject(true); mThread->setProject(p); mThread->check(checkSettings, true); } -void MainWindow::doCheckFiles(const QStringList &files) +void MainWindow::doAnalyzeFiles(const QStringList &files) { if (files.isEmpty()) { return; @@ -578,11 +578,11 @@ void MainWindow::analyzeFiles() p.ignoreOtherConfigs(cfg.toStdString()); } - doCheckProject(p); + doAnalyzeProject(p); return; } - doCheckFiles(selected); + doAnalyzeFiles(selected); } void MainWindow::analyzeDirectory() @@ -617,7 +617,7 @@ void MainWindow::analyzeDirectory() path += projFiles[0]; loadProjectFile(path); } else { - doCheckFiles(dir); + doAnalyzeFiles(dir); } } else { // If multiple project files found inform that there are project @@ -634,11 +634,11 @@ void MainWindow::analyzeDirectory() msgBox.setDefaultButton(QMessageBox::Yes); int dlgResult = msgBox.exec(); if (dlgResult == QMessageBox::Yes) { - doCheckFiles(dir); + doAnalyzeFiles(dir); } } } else { - doCheckFiles(dir); + doAnalyzeFiles(dir); } } @@ -949,7 +949,7 @@ void MainWindow::reAnalyzeAll() reAnalyze(true); } -void MainWindow::reCheckSelected(QStringList files, bool all) +void MainWindow::reAnalyzeSelected(QStringList files, bool all) { if (files.empty()) return; @@ -1183,7 +1183,7 @@ void MainWindow::showAuthors() void MainWindow::performSelectedFilesCheck(QStringList selectedFilesList) { - reCheckSelected(selectedFilesList, true); + reAnalyzeSelected(selectedFilesList, true); } void MainWindow::save() @@ -1333,10 +1333,10 @@ void MainWindow::loadProjectFile(const QString &filePath) mUI.mActionEditProjectFile->setEnabled(true); delete mProject; mProject = new Project(filePath, this); - checkProject(mProject); + analyzeProject(mProject); } -void MainWindow::checkProject(Project *project) +void MainWindow::analyzeProject(Project *project) { if (!project->isOpen()) { if (!project->open()) { @@ -1378,7 +1378,7 @@ void MainWindow::checkProject(Project *project) ImportProject p; QString prjfile = inf.canonicalPath() + '/' + project->getProjectFile()->getImportProject(); p.import(prjfile.toStdString()); - doCheckProject(p); + doAnalyzeProject(p); return; } @@ -1400,7 +1400,7 @@ void MainWindow::checkProject(Project *project) paths[i] = QDir::cleanPath(path); } } - doCheckFiles(paths); + doAnalyzeFiles(paths); } void MainWindow::newProjectFile() @@ -1426,7 +1426,7 @@ void MainWindow::newProjectFile() mProject->create(); if (mProject->edit()) { addProjectMRU(filepath); - checkProject(mProject); + analyzeProject(mProject); } } @@ -1451,7 +1451,7 @@ void MainWindow::editProjectFile() return; } if (mProject->edit()) - checkProject(mProject); + analyzeProject(mProject); } void MainWindow::showLogView() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index de7ddb3cc..ce844573e 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -231,13 +231,13 @@ private: * @param files list of selected files * @param all true if all files of list, false if modified files of list */ - void reCheckSelected(QStringList files, bool all); + void reAnalyzeSelected(QStringList files, bool all); /** * @brief Check the project. * @param project Pointer to the project to check. */ - void checkProject(Project *project); + void analyzeProject(Project *project); /** * @brief Set current language @@ -271,14 +271,14 @@ private: * @brief Check project * @param p imported project */ - void doCheckProject(ImportProject p); + void doAnalyzeProject(ImportProject p); /** * @brief Check all files specified in parameter files * * @param files List of files and/or directories to check */ - void doCheckFiles(const QStringList &files); + void doAnalyzeFiles(const QStringList &files); /** * @brief Get our default cppcheck settings and read project file.