diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-09-23 10:11:44 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-09-23 10:11:44 +0200 |
commit | 423ea729f801e8e1a6e35fc9b09d02f1375ddefd (patch) | |
tree | 13652a6f6dbbd172da0b2bbef8ab461140167d5d /src/plugins/autotest | |
parent | 834cb8d114110d4905c007f45841fd1045851ec7 (diff) | |
parent | a003a2e9f3a45413480bb7070ad9da5621094d0e (diff) |
Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
src/plugins/mcusupport/mcusupportoptions.cpp
Change-Id: I3fd0d0a6a3ff30bb990da3dc0f78e69f9e1247ef
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r-- | src/plugins/autotest/catch/catchoutputreader.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/autotest/catch/catchoutputreader.cpp b/src/plugins/autotest/catch/catchoutputreader.cpp index 60dea45cd54..f3ece59f7e2 100644 --- a/src/plugins/autotest/catch/catchoutputreader.cpp +++ b/src/plugins/autotest/catch/catchoutputreader.cpp @@ -27,6 +27,7 @@ #include "../testtreeitem.h" +#include <utils/fileutils.h> #include <utils/qtcassert.h> #include <QFileInfo> @@ -172,10 +173,12 @@ TestResultPtr CatchOutputReader::createDefaultResult() const result = new CatchResult(id(), m_testCaseInfo.first().name); result->setDescription(m_testCaseInfo.last().name); result->setLine(m_testCaseInfo.last().line); - const QString &relativePathFromBuildDir = m_testCaseInfo.last().filename; - if (!relativePathFromBuildDir.isEmpty()) { - const QFileInfo fileInfo(m_buildDir + '/' + relativePathFromBuildDir); - result->setFileName(fileInfo.canonicalFilePath()); + const QFileInfo fileInfo(m_testCaseInfo.last().filename); + const Utils::FilePath filePath = Utils::FilePath::fromFileInfo(fileInfo); + if (!filePath.isEmpty()) { + result->setFileName(fileInfo.isAbsolute() + ? filePath.toString() + : QFileInfo(m_buildDir + '/' + filePath.toString()).canonicalFilePath()); } } else { result = new CatchResult(id(), QString()); |