forked from qt-creator/qt-creator
AutoTest: Modernize code a bit
Change-Id: Ie56f6e5cb8a4f1962bd8df5e57214911ae609921 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -118,10 +118,8 @@ void TestConfiguration::completeTestInformation(int runMode)
|
||||
// some project manager store line/column information as well inside ProjectPart
|
||||
if (bti.isValid() && m_proFile.startsWith(bti.projectFilePath.toString())) {
|
||||
targetFile = bti.targetFilePath.toString();
|
||||
if (Utils::HostOsInfo::isWindowsHost()
|
||||
&& !targetFile.toLower().endsWith(QLatin1String(".exe"))) {
|
||||
if (Utils::HostOsInfo::isWindowsHost() && !targetFile.toLower().endsWith(".exe"))
|
||||
targetFile = Utils::HostOsInfo::withExecutableSuffix(targetFile);
|
||||
}
|
||||
targetName = bti.targetName;
|
||||
break;
|
||||
}
|
||||
@@ -274,7 +272,7 @@ QString TestConfiguration::executableFilePath() const
|
||||
} else if (commandFileInfo.path() == "."){
|
||||
QString fullCommandFileName = m_targetFile;
|
||||
if (Utils::HostOsInfo::isWindowsHost() && !m_targetFile.endsWith(".exe"))
|
||||
fullCommandFileName = m_targetFile + QLatin1String(".exe");
|
||||
fullCommandFileName = m_targetFile + ".exe";
|
||||
// TODO: check if we can use searchInPath() from Utils::Environment
|
||||
const QStringList &pathList = m_environment.toProcessEnvironment().value("PATH").split(
|
||||
Utils::HostOsInfo::pathListSeparator());
|
||||
|
||||
Reference in New Issue
Block a user