AutoTest: Set gtest-result line number even if file can't be resolved

Task-number: QTCREATORBUG-18725
Change-Id: Id9c4749feafcd3dc3c54fcb25589f45e9cebe283
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Claus Steuer
2018-04-05 13:44:31 +02:00
parent 5e483d04bc
commit 27190cd50a

View File

@@ -151,14 +151,15 @@ void GTestOutputReader::processOutput(const QByteArray &outputLine)
match = &errorLocation;
if (match) {
QString file = constructSourceFilePath(m_buildDir, match->cap(1));
if (!file.isEmpty()) {
testResult->setFileName(file);
testResult->setLine(match->cap(2).toInt());
QString file = constructSourceFilePath(m_buildDir, match->cap(1));
if (!file.isEmpty())
testResult->setFileName(file);
break;
}
}
}
reportResult(testResult);
m_description.clear();
testResult = createDefaultResult();