Avoid explicit checks for windows host when working with file paths

We have fileNameCaseSensitivity and withExecutableSuffix et al.

Change-Id: I79bd2cd57e258c3f15673a661a49bab597d7afa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Eike Ziller
2014-06-12 13:33:51 +02:00
parent de32c0fc4f
commit 1fda462500
10 changed files with 28 additions and 53 deletions

View File

@@ -178,14 +178,6 @@ QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersi
return envFile;
}
Utils::FileName QnxUtils::executableWithExtension(const Utils::FileName &fileName)
{
Utils::FileName result = fileName;
if (Utils::HostOsInfo::isWindowsHost())
result.appendString(QLatin1String(".exe"));
return result;
}
QString QnxUtils::bbDataDirPath()
{
const QString homeDir = QDir::homePath();
@@ -272,11 +264,7 @@ QList<ConfigInstallInformation> QnxUtils::installedConfigs(const QString &config
QString QnxUtils::sdkInstallerPath(const QString &ndkPath)
{
QString sdkinstallPath;
if (Utils::HostOsInfo::isWindowsHost())
sdkinstallPath = ndkPath + QLatin1String("/qde.exe");
else
sdkinstallPath = ndkPath + QLatin1String("/qde");
QString sdkinstallPath = Utils::HostOsInfo::withExecutableSuffix(ndkPath + QLatin1String("/qde"));
if (QFileInfo(sdkinstallPath).exists())
return sdkinstallPath;