forked from qt-creator/qt-creator
HostOsInfo: Add some more useful abstractions.
Namely: - path list separator - executable suffix - file name case sensitivity All of these are duplicated in various places in the current Creator code. Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -665,7 +665,7 @@ QString SynchronousProcess::locateBinary(const QString &path, const QString &bin
|
||||
return currentDirBinary;
|
||||
}
|
||||
|
||||
const QStringList paths = path.split(pathSeparator());
|
||||
const QStringList paths = path.split(HostOsInfo::pathListSeparator());
|
||||
if (paths.empty())
|
||||
return QString();
|
||||
const QStringList::const_iterator cend = paths.constEnd();
|
||||
@@ -684,9 +684,4 @@ QString SynchronousProcess::locateBinary(const QString &binary)
|
||||
return locateBinary(QString::fromLocal8Bit(path), binary);
|
||||
}
|
||||
|
||||
QChar SynchronousProcess::pathSeparator()
|
||||
{
|
||||
return HostOsInfo::isWindowsHost() ? QLatin1Char(';') : QLatin1Char(':');
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
Reference in New Issue
Block a user