From a85d7ef5389d504c924206951dd11d5e4c986f4a Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 4 Jul 2023 08:01:21 +0200 Subject: [PATCH] AutoTest: Avoid some unneeded fetching of snapshot Change-Id: I002b3537c2f1b468c52b08017e30efd4c969aeb2 Reviewed-by: David Schulz --- src/plugins/autotest/quick/quicktestparser.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/plugins/autotest/quick/quicktestparser.cpp b/src/plugins/autotest/quick/quicktestparser.cpp index a4cf0967b6c..65011d93986 100644 --- a/src/plugins/autotest/quick/quicktestparser.cpp +++ b/src/plugins/autotest/quick/quicktestparser.cpp @@ -165,8 +165,6 @@ QList QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Fi ModelManagerInterface::importScan(ModelManagerInterface::workingCopy(), paths, qmlJsMM, false /*emitDocumentChanges*/, false /*onlyTheLib*/, true /*forceRescan*/ ); - const Snapshot snapshot = QmlJSTools::Internal::ModelManager::instance()->snapshot(); - QDirIterator it(srcDir.toString(), QDir::Dirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories); @@ -184,7 +182,7 @@ QList QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Fi QList foundDocs; for (const FilePath &path : std::as_const(dirs)) { - const QList docs = snapshot.documentsInDirectory(path); + const QList docs = m_qmlSnapshot.documentsInDirectory(path); for (const Document::Ptr &doc : docs) { const FilePath fi = doc->fileName(); //const QFileInfo fi(doc->fileName());