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

@@ -149,7 +149,7 @@ QList<Document::Ptr> QuickTestParser::scanDirectoryForQuickTestQmlFiles(const QS
QFutureInterface<void> future;
PathsAndLanguages paths;
paths.maybeInsert(Utils::FilePath::fromString(srcDir), Dialect::Qml);
ModelManagerInterface::importScan(future, qmlJsMM->workingCopy(), paths, qmlJsMM,
ModelManagerInterface::importScan(future, ModelManagerInterface::workingCopy(), paths, qmlJsMM,
false /*emitDocumentChanges*/, false /*onlyTheLib*/, true /*forceRescan*/ );
const Snapshot snapshot = QmlJSTools::Internal::ModelManager::instance()->snapshot();
@@ -284,7 +284,8 @@ void QuickTestParser::handleDirectoryChanged(const QString &directory)
paths.maybeInsert(Utils::FilePath::fromString(directory), Dialect::Qml);
QFutureInterface<void> future;
ModelManagerInterface *qmlJsMM = ModelManagerInterface::instance();
ModelManagerInterface::importScan(future, qmlJsMM->workingCopy(), paths, qmlJsMM,
ModelManagerInterface::importScan(future, ModelManagerInterface::workingCopy(), paths,
qmlJsMM,
true /*emitDocumentChanges*/,
false /*onlyTheLib*/,
true /*forceRescan*/ );