AutoTest: Use using namespace Utils more often

Change-Id: I9d20cd3496c4719d58a977f8fd53253c86d55463
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2023-01-16 15:00:15 +01:00
parent d05c5b7d07
commit bc3ebef7ce
41 changed files with 343 additions and 310 deletions

View File

@@ -16,18 +16,18 @@
#include <QFileInfo>
#include <QProcess>
using namespace Utils;
namespace Autotest {
Utils::FilePath TestOutputReader::constructSourceFilePath(const Utils::FilePath &path,
const QString &file)
FilePath TestOutputReader::constructSourceFilePath(const FilePath &path, const QString &file)
{
const Utils::FilePath filePath = path.resolvePath(file);
return filePath.isReadableFile() ? filePath : Utils::FilePath();
const FilePath filePath = path.resolvePath(file);
return filePath.isReadableFile() ? filePath : FilePath();
}
TestOutputReader::TestOutputReader(const QFutureInterface<TestResult> &futureInterface,
Utils::QtcProcess *testApplication,
const Utils::FilePath &buildDirectory)
QtcProcess *testApplication, const FilePath &buildDirectory)
: m_futureInterface(futureInterface)
, m_testApplication(testApplication)
, m_buildDir(buildDirectory)
@@ -149,10 +149,10 @@ void TestOutputReader::checkForSanitizerOutput(const QByteArray &line)
m_sanitizerLines.append("Sanitizer Issue");
m_sanitizerLines.append(lineStr);
if (m_sanitizerOutputMode == SanitizerOutputMode::Ubsan) {
const Utils::FilePath path = constructSourceFilePath(m_buildDir, match.captured(1));
const FilePath path = constructSourceFilePath(m_buildDir, match.captured(1));
// path may be empty if not existing - so, provide at least what we have
m_sanitizerResult.setFileName(
path.exists() ? path : Utils::FilePath::fromString(match.captured(1)));
path.exists() ? path : FilePath::fromString(match.captured(1)));
m_sanitizerResult.setLine(match.captured(2).toInt());
}
}