Autotest: extract cpp document lookup into cpp test parser

Change-Id: I261684206ec7ff9a97ca4a88b5846ebbc0fdda47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-05-10 08:58:56 +02:00
parent 6a1a5be10c
commit 2f505fd0f9
4 changed files with 12 additions and 7 deletions

View File

@@ -389,9 +389,9 @@ void QtTestParser::release()
bool QtTestParser::processDocument(QFutureInterface<TestParseResultPtr> futureInterface,
const QString &fileName)
{
if (!m_cppSnapshot.contains(fileName) || !selectedForBuilding(fileName))
CPlusPlus::Document::Ptr doc = document(fileName);
if (doc.isNull())
return false;
CPlusPlus::Document::Ptr doc = m_cppSnapshot.find(fileName).value();
const QString &oldName = m_testCaseNames.value(fileName);
const QStringList &alternativeFiles = m_alternativeFiles.values(fileName);
if ((!includesQtTest(doc, m_cppSnapshot) || !qtTestLibDefined(fileName)) && oldName.isEmpty())