diff options
author | hjk <hjk@qt.io> | 2019-05-20 17:22:52 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-24 07:32:17 +0000 |
commit | 274bbefeff4b03880d4996eb0e833834fdb8261b (patch) | |
tree | c269a1297a5efbee2608f74f33f76a2e83b9d7de /src/plugins/ios | |
parent | 389fd37a68c1a0b881833a49697df02e2a012ca3 (diff) |
iOS: Remove remaining FileName::appendPath uses
Change-Id: Ia550151bbcad696a3bd59e630e80a8f89a908e08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r-- | src/plugins/ios/iostoolhandler.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index d01e0c01143..f3ed0667b0f 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -657,18 +657,14 @@ IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &de if (k.startsWith(QLatin1String("DYLD_"))) env.remove(k); QStringList frameworkPaths; - Utils::FileName xcPath = IosConfigurations::developerPath(); - QString privateFPath = xcPath.appendPath(QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks")).toFileInfo().canonicalFilePath(); - if (!privateFPath.isEmpty()) - frameworkPaths << privateFPath; - QString otherFPath = xcPath.appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath(); - if (!otherFPath.isEmpty()) - frameworkPaths << otherFPath; - QString sharedFPath = xcPath.appendPath(QLatin1String("../SharedFrameworks")).toFileInfo().canonicalFilePath(); - if (!sharedFPath.isEmpty()) - frameworkPaths << sharedFPath; - frameworkPaths << QLatin1String("/System/Library/Frameworks") - << QLatin1String("/System/Library/PrivateFrameworks"); + const Utils::FileName libPath = IosConfigurations::developerPath().pathAppended("Platforms/iPhoneSimulator.platform/Developer/Library"); + for (const auto framework : {"PrivateFrameworks", "OtherFrameworks", "SharedFrameworks"}) { + const QString frameworkPath = + libPath.pathAppended(QLatin1String(framework)).toFileInfo().canonicalFilePath(); + if (!frameworkPath.isEmpty()) + frameworkPaths << frameworkPath; + } + frameworkPaths << "/System/Library/Frameworks" << "/System/Library/PrivateFrameworks"; env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), frameworkPaths.join(QLatin1Char(':'))); qCDebug(toolHandlerLog) << "IosToolHandler runEnv:" << env.toStringList(); process->setProcessEnvironment(env); |