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:
Christian Kandeler
2012-08-31 16:39:20 +02:00
parent 16a1a2653a
commit 3c6f76d16c
28 changed files with 84 additions and 117 deletions

View File

@@ -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