GUI: Renamed methods 'Check' => 'Analyze'

This commit is contained in:
Daniel Marjamäki 2017-07-30 11:50:08 +02:00
parent 17142db490
commit 23ed35b1e6
2 changed files with 21 additions and 21 deletions

View File

@ -249,7 +249,7 @@ void MainWindow::handleCLIParams(const QStringList &params)
} else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) { } else if ((index = params.indexOf(QRegExp(".*\\.xml$", Qt::CaseInsensitive), 0)) >= 0 && index < params.length() && QFile(params[index]).exists()) {
loadResults(params[index],QDir::currentPath()); loadResults(params[index],QDir::currentPath());
} else } else
doCheckFiles(params); doAnalyzeFiles(params);
} }
void MainWindow::loadSettings() void MainWindow::loadSettings()
@ -378,7 +378,7 @@ void MainWindow::saveSettings() const
mUI.mResults->saveSettings(mSettings); mUI.mResults->saveSettings(mSettings);
} }
void MainWindow::doCheckProject(ImportProject p) void MainWindow::doAnalyzeProject(ImportProject p)
{ {
clearResults(); clearResults();
@ -416,12 +416,12 @@ void MainWindow::doCheckProject(ImportProject p)
AnalyzerInformation::writeFilesTxt(checkSettings.buildDir, sourcefiles, p.fileSettings); AnalyzerInformation::writeFilesTxt(checkSettings.buildDir, sourcefiles, p.fileSettings);
} }
//mThread->SetCheckProject(true); //mThread->SetanalyzeProject(true);
mThread->setProject(p); mThread->setProject(p);
mThread->check(checkSettings, true); mThread->check(checkSettings, true);
} }
void MainWindow::doCheckFiles(const QStringList &files) void MainWindow::doAnalyzeFiles(const QStringList &files)
{ {
if (files.isEmpty()) { if (files.isEmpty()) {
return; return;
@ -578,11 +578,11 @@ void MainWindow::analyzeFiles()
p.ignoreOtherConfigs(cfg.toStdString()); p.ignoreOtherConfigs(cfg.toStdString());
} }
doCheckProject(p); doAnalyzeProject(p);
return; return;
} }
doCheckFiles(selected); doAnalyzeFiles(selected);
} }
void MainWindow::analyzeDirectory() void MainWindow::analyzeDirectory()
@ -617,7 +617,7 @@ void MainWindow::analyzeDirectory()
path += projFiles[0]; path += projFiles[0];
loadProjectFile(path); loadProjectFile(path);
} else { } else {
doCheckFiles(dir); doAnalyzeFiles(dir);
} }
} else { } else {
// If multiple project files found inform that there are project // If multiple project files found inform that there are project
@ -634,11 +634,11 @@ void MainWindow::analyzeDirectory()
msgBox.setDefaultButton(QMessageBox::Yes); msgBox.setDefaultButton(QMessageBox::Yes);
int dlgResult = msgBox.exec(); int dlgResult = msgBox.exec();
if (dlgResult == QMessageBox::Yes) { if (dlgResult == QMessageBox::Yes) {
doCheckFiles(dir); doAnalyzeFiles(dir);
} }
} }
} else { } else {
doCheckFiles(dir); doAnalyzeFiles(dir);
} }
} }
@ -949,7 +949,7 @@ void MainWindow::reAnalyzeAll()
reAnalyze(true); reAnalyze(true);
} }
void MainWindow::reCheckSelected(QStringList files, bool all) void MainWindow::reAnalyzeSelected(QStringList files, bool all)
{ {
if (files.empty()) if (files.empty())
return; return;
@ -1183,7 +1183,7 @@ void MainWindow::showAuthors()
void MainWindow::performSelectedFilesCheck(QStringList selectedFilesList) void MainWindow::performSelectedFilesCheck(QStringList selectedFilesList)
{ {
reCheckSelected(selectedFilesList, true); reAnalyzeSelected(selectedFilesList, true);
} }
void MainWindow::save() void MainWindow::save()
@ -1333,10 +1333,10 @@ void MainWindow::loadProjectFile(const QString &filePath)
mUI.mActionEditProjectFile->setEnabled(true); mUI.mActionEditProjectFile->setEnabled(true);
delete mProject; delete mProject;
mProject = new Project(filePath, this); mProject = new Project(filePath, this);
checkProject(mProject); analyzeProject(mProject);
} }
void MainWindow::checkProject(Project *project) void MainWindow::analyzeProject(Project *project)
{ {
if (!project->isOpen()) { if (!project->isOpen()) {
if (!project->open()) { if (!project->open()) {
@ -1378,7 +1378,7 @@ void MainWindow::checkProject(Project *project)
ImportProject p; ImportProject p;
QString prjfile = inf.canonicalPath() + '/' + project->getProjectFile()->getImportProject(); QString prjfile = inf.canonicalPath() + '/' + project->getProjectFile()->getImportProject();
p.import(prjfile.toStdString()); p.import(prjfile.toStdString());
doCheckProject(p); doAnalyzeProject(p);
return; return;
} }
@ -1400,7 +1400,7 @@ void MainWindow::checkProject(Project *project)
paths[i] = QDir::cleanPath(path); paths[i] = QDir::cleanPath(path);
} }
} }
doCheckFiles(paths); doAnalyzeFiles(paths);
} }
void MainWindow::newProjectFile() void MainWindow::newProjectFile()
@ -1426,7 +1426,7 @@ void MainWindow::newProjectFile()
mProject->create(); mProject->create();
if (mProject->edit()) { if (mProject->edit()) {
addProjectMRU(filepath); addProjectMRU(filepath);
checkProject(mProject); analyzeProject(mProject);
} }
} }
@ -1451,7 +1451,7 @@ void MainWindow::editProjectFile()
return; return;
} }
if (mProject->edit()) if (mProject->edit())
checkProject(mProject); analyzeProject(mProject);
} }
void MainWindow::showLogView() void MainWindow::showLogView()

View File

@ -231,13 +231,13 @@ private:
* @param files list of selected files * @param files list of selected files
* @param all true if all files of list, false if modified files of list * @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. * @brief Check the project.
* @param project Pointer to the project to check. * @param project Pointer to the project to check.
*/ */
void checkProject(Project *project); void analyzeProject(Project *project);
/** /**
* @brief Set current language * @brief Set current language
@ -271,14 +271,14 @@ private:
* @brief Check project * @brief Check project
* @param p imported project * @param p imported project
*/ */
void doCheckProject(ImportProject p); void doAnalyzeProject(ImportProject p);
/** /**
* @brief Check all files specified in parameter files * @brief Check all files specified in parameter files
* *
* @param files List of files and/or directories to check * @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. * @brief Get our default cppcheck settings and read project file.