Don't access static functions/fields via instance

Courtesy of readability-static-accessed-through-instance

Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Alessandro Portale
2020-11-18 22:42:51 +01:00
parent 0c0347ce61
commit b2a766a79a
52 changed files with 126 additions and 119 deletions

View File

@@ -154,7 +154,7 @@ void HelpManager::unregisterDocumentation(const QStringList &fileNames)
const auto getNamespaces = [](const QStringList &fileNames) {
QMutexLocker locker(&d->m_helpengineMutex);
return Utils::transform(fileNames, [](const QString &filePath) {
return d->m_helpEngine->namespaceName(filePath);
return QHelpEngineCore::namespaceName(filePath);
});
};
unregisterNamespaces(getNamespaces(fileNames));
@@ -179,7 +179,7 @@ void HelpManager::registerDocumentationNow(QFutureInterface<bool> &futureInterfa
if (futureInterface.isCanceled())
break;
futureInterface.setProgressValue(futureInterface.progressValue() + 1);
const QString &nameSpace = helpEngine.namespaceName(file);
const QString &nameSpace = QHelpEngineCore::namespaceName(file);
if (nameSpace.isEmpty())
continue;
if (!nameSpaces.contains(nameSpace)) {
@@ -294,7 +294,7 @@ QStringList HelpManager::registeredNamespaces()
QString HelpManager::namespaceFromFile(const QString &file)
{
QTC_ASSERT(!d->m_needsSetup, return {});
return d->m_helpEngine->namespaceName(file);
return QHelpEngineCore::namespaceName(file);
}
QString HelpManager::fileFromNamespace(const QString &nameSpace)