Don't access static functions/fields via instance

Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2020-11-27 13:12:23 +01:00
parent 0cc5ee12c5
commit a3857a996a
35 changed files with 52 additions and 56 deletions

View File

@@ -114,7 +114,7 @@ void TestCodeParser::syncTestFrameworks(const QList<ITestFramework *> &framework
// there's a running parse
m_fullUpdatePostponed = m_partialUpdatePostponed = false;
m_postponedFiles.clear();
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
Core::ProgressManager::cancelTasks(Constants::TASK_PARSE);
}
m_testCodeParsers.clear();
qCDebug(LOG) << "Setting" << frameworks << "as current parsers";
@@ -206,7 +206,7 @@ void TestCodeParser::onStartupProjectChanged(Project *project)
{
if (m_parserState == FullParse || m_parserState == PartialParse) {
qCDebug(LOG) << "Canceling scanForTest (startup project changed)";
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
Core::ProgressManager::cancelTasks(Constants::TASK_PARSE);
}
emit aboutToPerformFullParse();
if (project)
@@ -271,7 +271,7 @@ bool TestCodeParser::postponed(const QStringList &fileList)
m_postponedFiles.clear();
m_fullUpdatePostponed = true;
qCDebug(LOG) << "Canceling scanForTest (full parse triggered while running a scan)";
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
Core::ProgressManager::cancelTasks(Constants::TASK_PARSE);
} else {
// partial parse triggered, but full parse is postponed already, ignoring this
if (m_fullUpdatePostponed)
@@ -393,7 +393,7 @@ void TestCodeParser::onTaskStarted(Utils::Id type)
m_partialUpdatePostponed = !m_fullUpdatePostponed;
qCDebug(LOG) << "Canceling scan for test (CppModelParsing started)";
parsingHasFailed = true;
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
Core::ProgressManager::cancelTasks(Constants::TASK_PARSE);
}
}
}