forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user