iOS: Remove remaining FileName::appendPath uses

Change-Id: Ia550151bbcad696a3bd59e630e80a8f89a908e08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2019-05-20 17:22:52 +02:00
parent 389fd37a68
commit 274bbefeff

View File

@@ -657,18 +657,14 @@ IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &de
if (k.startsWith(QLatin1String("DYLD_"))) if (k.startsWith(QLatin1String("DYLD_")))
env.remove(k); env.remove(k);
QStringList frameworkPaths; QStringList frameworkPaths;
Utils::FileName xcPath = IosConfigurations::developerPath(); const Utils::FileName libPath = IosConfigurations::developerPath().pathAppended("Platforms/iPhoneSimulator.platform/Developer/Library");
QString privateFPath = xcPath.appendPath(QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks")).toFileInfo().canonicalFilePath(); for (const auto framework : {"PrivateFrameworks", "OtherFrameworks", "SharedFrameworks"}) {
if (!privateFPath.isEmpty()) const QString frameworkPath =
frameworkPaths << privateFPath; libPath.pathAppended(QLatin1String(framework)).toFileInfo().canonicalFilePath();
QString otherFPath = xcPath.appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath(); if (!frameworkPath.isEmpty())
if (!otherFPath.isEmpty()) frameworkPaths << frameworkPath;
frameworkPaths << otherFPath; }
QString sharedFPath = xcPath.appendPath(QLatin1String("../SharedFrameworks")).toFileInfo().canonicalFilePath(); frameworkPaths << "/System/Library/Frameworks" << "/System/Library/PrivateFrameworks";
if (!sharedFPath.isEmpty())
frameworkPaths << sharedFPath;
frameworkPaths << QLatin1String("/System/Library/Frameworks")
<< QLatin1String("/System/Library/PrivateFrameworks");
env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), frameworkPaths.join(QLatin1Char(':'))); env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), frameworkPaths.join(QLatin1Char(':')));
qCDebug(toolHandlerLog) << "IosToolHandler runEnv:" << env.toStringList(); qCDebug(toolHandlerLog) << "IosToolHandler runEnv:" << env.toStringList();
process->setProcessEnvironment(env); process->setProcessEnvironment(env);