Commit 3f760bad authored by Christian Stenger's avatar Christian Stenger

AutoTest: Avoid temporary storing of QMap

Change-Id: I099ffb6931947f72ad242e858d82a109a0da85f9
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 6ebd3cc7
......@@ -637,14 +637,11 @@ void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document)
return;
}
const CPlusPlus::Snapshot snapshot = CppTools::CppModelManager::instance()->snapshot();
QMap<QString, QString> referencingFiles = m_model->referencingFiles();
if (referencingFiles.contains(fileName)) {
const QString &referencingFile = referencingFiles.value(fileName);
if (!referencingFile.isEmpty() && snapshot.contains(referencingFile)) {
qCDebug(LOG) << "calling scanForTests with cached referencing files"
<< "(onQmlDocumentUpdated)";
scanForTests(QStringList(referencingFile));
}
const QString &referencingFile = m_model->referencingFiles().value(fileName);
if (!referencingFile.isEmpty() && snapshot.contains(referencingFile)) {
qCDebug(LOG) << "calling scanForTests with cached referencing files"
<< "(onQmlDocumentUpdated)";
scanForTests(QStringList(referencingFile));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment