Proliferate pathListSeparator()

Change-Id: I546107af6a88ad5901659a0a64485e4ebca3a164
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2023-04-06 18:31:47 +02:00
parent fe45294357
commit 1e1befd9eb
4 changed files with 7 additions and 16 deletions

View File

@@ -155,14 +155,13 @@ void Environment::prependOrSet(const QString &key, const QString &value, const Q
void Environment::prependOrSetLibrarySearchPath(const FilePath &value)
{
QTC_CHECK(value.osType() == osType());
const QChar sep = OsSpecificAspects::pathListSeparator(osType());
switch (osType()) {
case OsTypeWindows: {
const QChar sep = ';';
prependOrSet("PATH", value.nativePath(), sep);
break;
}
case OsTypeMac: {
const QChar sep = ':';
const QString nativeValue = value.nativePath();
prependOrSet("DYLD_LIBRARY_PATH", nativeValue, sep);
prependOrSet("DYLD_FRAMEWORK_PATH", nativeValue, sep);
@@ -170,7 +169,6 @@ void Environment::prependOrSetLibrarySearchPath(const FilePath &value)
}
case OsTypeLinux:
case OsTypeOtherUnix: {
const QChar sep = ':';
prependOrSet("LD_LIBRARY_PATH", value.nativePath(), sep);
break;
}