forked from qt-creator/qt-creator
Utils: Introduce new class OsSpecificAspects.
This is basically a generalization of HostOsInfo for a system that might not be the host system. HostOsInfo is now implemented in terms of the new class. Prospective use case: Untie Utils::Environment from the host system. Change-Id: If333b96674652109fcb0ad79f75aaaf5e86e17e3 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -187,14 +187,14 @@ void Environment::prependOrSetPath(const QString &value)
|
||||
void Environment::prependOrSetLibrarySearchPath(const QString &value)
|
||||
{
|
||||
switch (HostOsInfo::hostOs()) {
|
||||
case HostOsInfo::HostOsWindows: {
|
||||
case OsTypeWindows: {
|
||||
const QChar sep = QLatin1Char(';');
|
||||
const QLatin1String path("PATH");
|
||||
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
|
||||
break;
|
||||
}
|
||||
case HostOsInfo::HostOsLinux:
|
||||
case HostOsInfo::HostOsOtherUnix: {
|
||||
case OsTypeLinux:
|
||||
case OsTypeOtherUnix: {
|
||||
const QChar sep = QLatin1Char(':');
|
||||
const QLatin1String path("LD_LIBRARY_PATH");
|
||||
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
|
||||
|
||||
Reference in New Issue
Block a user