forked from qt-creator/qt-creator
Introduce and use FileName::exists()
This can use the faster route through QFileInfo::exist now. Change-Id: Idb41b5d5185d7f02eacba498fb01f483d95e8d57 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -136,7 +136,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
|
||||
Utils::FileName xcodeInfo = IosConfigurations::developerPath().parentDir()
|
||||
.appendPath(QLatin1String("Info.plist"));
|
||||
bool buggyLldb = false;
|
||||
if (xcodeInfo.toFileInfo().exists()) {
|
||||
if (xcodeInfo.exists()) {
|
||||
QSettings settings(xcodeInfo.toString(), QSettings::NativeFormat);
|
||||
QStringList version = settings.value(QLatin1String("CFBundleShortVersionString")).toString()
|
||||
.split(QLatin1Char('.'));
|
||||
@@ -147,7 +147,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
|
||||
bundlePath.chop(4);
|
||||
Utils::FileName dsymPath = Utils::FileName::fromString(
|
||||
bundlePath.append(QLatin1String(".dSYM")));
|
||||
if (!dsymPath.toFileInfo().exists()) {
|
||||
if (!dsymPath.exists()) {
|
||||
if (buggyLldb)
|
||||
TaskHub::addTask(Task::Warning,
|
||||
tr("Debugging with Xcode 5.0.x can be unreliable without a dSYM. "
|
||||
|
||||
@@ -272,7 +272,7 @@ void IosDeployStep::checkProvisioningProfile()
|
||||
|
||||
// the file is a signed plist stored in DER format
|
||||
// we simply search for start and end of the plist instead of decoding the DER payload
|
||||
if (!provisioningFilePath.toFileInfo().exists())
|
||||
if (!provisioningFilePath.exists())
|
||||
return;
|
||||
QFile provisionFile(provisioningFilePath.toString());
|
||||
if (!provisionFile.open(QIODevice::ReadOnly))
|
||||
|
||||
@@ -450,7 +450,7 @@ QStringList IosDsymBuildStep::defaultCmdList() const
|
||||
QString dsymutilCmd = QLatin1String("dsymutil");
|
||||
Utils::FileName dsymUtilPath = IosConfigurations::developerPath()
|
||||
.appendPath(QLatin1String("Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil"));
|
||||
if (dsymUtilPath.toFileInfo().exists())
|
||||
if (dsymUtilPath.exists())
|
||||
dsymutilCmd = dsymUtilPath.toUserOutput();
|
||||
IosRunConfiguration *runConf =
|
||||
qobject_cast<IosRunConfiguration *>(target()->activeRunConfiguration());
|
||||
|
||||
@@ -738,7 +738,7 @@ QString IosToolHandler::iosSimulatorToolPath()
|
||||
Utils::FileName devPath = Internal::IosConfigurations::developerPath();
|
||||
bool version182 = devPath.appendPath(QLatin1String(
|
||||
"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework"))
|
||||
.toFileInfo().exists();
|
||||
.exists();
|
||||
QString res = Core::ICore::libexecPath() + QLatin1String("/ios/iossim");
|
||||
if (version182)
|
||||
res = res.append(QLatin1String("_1_8_2"));
|
||||
|
||||
Reference in New Issue
Block a user