diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2014-12-12 13:33:03 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2014-12-16 14:29:59 +0100 |
commit | 7386ac35097b5dc7a32a07978eddb4e1338ff7ad (patch) | |
tree | 1823b1b5fcc116addbb438d62354f75f50492dbb /src/tools/3rdparty | |
parent | 0a00bac452b4b839a587b65228785b981f144b4e (diff) | |
download | qt-creator-7386ac35097b5dc7a32a07978eddb4e1338ff7ad.tar.gz |
iossim: Fix compilation against SDKs earlier than 10.9
Looks like firstObject is not exported in SDKs ealier than 10.9,
even though the documentation claims differently. Latest Xcode
on OS X 10.7 doesn't provide the 10.9 SDK, so avoid using
firstObject and lastObject
Change-Id: Ia266c6aa2030d4799a3cec13e97ab7175adf5138
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/tools/3rdparty')
-rw-r--r-- | src/tools/3rdparty/iossim/iphonesimulator.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/3rdparty/iossim/iphonesimulator.mm b/src/tools/3rdparty/iossim/iphonesimulator.mm index b120fab64e..c75acef7a9 100644 --- a/src/tools/3rdparty/iossim/iphonesimulator.mm +++ b/src/tools/3rdparty/iossim/iphonesimulator.mm @@ -608,8 +608,8 @@ static void ChildSignal(int /*arg*/) { NSArray* devices = [deviceSet availableDevices]; NSArray* deviceTypeAndVersion = [devTypeId componentsSeparatedByString:@","]; if(deviceTypeAndVersion.count == 2) { - NSString* typeIdentifier = [deviceTypeAndVersion.firstObject stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - NSString* versionString = [deviceTypeAndVersion.lastObject stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];; + NSString* typeIdentifier = [[deviceTypeAndVersion objectAtIndex:0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + NSString* versionString = [[deviceTypeAndVersion objectAtIndex:1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];; for (SimDevice* device in devices) { if ([device.deviceType.identifier isEqualToString:typeIdentifier] && [device.runtime.versionString isEqualToString:versionString]) { return device; |