forked from qt-creator/qt-creator
AutoTest: Avoid some unneeded fetching of snapshot
Change-Id: I002b3537c2f1b468c52b08017e30efd4c969aeb2 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -165,8 +165,6 @@ QList<Document::Ptr> 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<Document::Ptr> QuickTestParser::scanDirectoryForQuickTestQmlFiles(const Fi
|
||||
QList<Document::Ptr> foundDocs;
|
||||
|
||||
for (const FilePath &path : std::as_const(dirs)) {
|
||||
const QList<Document::Ptr> docs = snapshot.documentsInDirectory(path);
|
||||
const QList<Document::Ptr> docs = m_qmlSnapshot.documentsInDirectory(path);
|
||||
for (const Document::Ptr &doc : docs) {
|
||||
const FilePath fi = doc->fileName();
|
||||
//const QFileInfo fi(doc->fileName());
|
||||
|
Reference in New Issue
Block a user