diff --git a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc index cc374bb0650a16f6bcb13c6983f842b9aa59eb2d..cc0586bed0b6aad5b1932c71a8d38b2a580a99da 100644 --- a/doc/src/qtquick/qtquick-modules-with-plugins.qdoc +++ b/doc/src/qtquick/qtquick-modules-with-plugins.qdoc @@ -84,4 +84,20 @@ However, this automatic dumping is a fallback mechanism with many points of failure and you cannot rely upon it. + \section1 Running QML Modules in Qt Quick Designer + + \QMLD uses a QML emulation layer (also called QML Puppet) to render and + preview images and to collect data. To be able to render custom types + correctly from QML modules, the emulation layer must be built with the same + Qt version as the QML modules. + + By default, the emulation layer is provided by \QC and built with the same + Qt version as \QC. Therefore, your QML modules will mostly not work out of + the box. + + To use an emulation layer that is built with the Qt + configured in the build and run kit for the project, deselect the + \gui {Always use the QML emulation layer provided by Qt Creator} check box. + \QC builds the emulation layer when you select the \gui Design mode. + */ diff --git a/doc/src/widgets/qtdesigner-plugins.qdoc b/doc/src/widgets/qtdesigner-plugins.qdoc index 2d4a786d701d445a93733bf6195d711dd8f68df0..cc02bbc65c74432af30cecef740de56d290883d3 100644 --- a/doc/src/widgets/qtdesigner-plugins.qdoc +++ b/doc/src/widgets/qtdesigner-plugins.qdoc @@ -66,15 +66,15 @@ \section2 Configuring Qt Designer Plugins on OS X - On the Mac, a GUI application must be built and run from a bundle. A bundle + On OS X, a GUI application must be built and run from a bundle. A bundle is a directory structure that appears as a single entity when viewed in the Finder. A bundle for an application typcially contains the executable and all the resources it needs. \QC uses its own set of Qt Libraries located in the bundle, and therefore, you need to configure the \QD plugins that you want to use with \QC. - Fore more information about how to deploy applications to Mac OS, see - \l{Qt for Mac OS X - Deployment}. + Fore more information about how to deploy applications to OS X, see + \l{Qt for OS X - Deployment}. The following example illustrates how to configure version 5.2.1 of the \l{http://qwt.sourceforge.net/}{Qwt - Qt Widgets for Technical Applications} diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index 576a22885273c5f7e2af8d86b75efdf07cd0283c..85e348e4cc3a12474bbc4b4bc3a0fceca6edf099 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -10514,6 +10514,18 @@ Sie können die Änderungen in einem Stash ablegen oder zurücksetzen.Always save when leaving subcomponent in bread crumb Immer speichern, wenn eine Subkomponente per Breadcrumb Navigation verlassen wird + + QML Emulation Layer + QML-Emulationsschicht + + + If you do not select this checkbox, Qt Quick Designer uses the QML emulation layer (QML Puppet) built with the Qt configured in the build and run kit for the project. + Wenn Sie diese Option nicht aktivieren, benutzt Qt Quick Designer die QML-Emulationsschicht (QML Puppet), die mit dem für das Projekt eingestellten Kit erstellt wurde. + + + Always use the QML emulation layer provided by Qt Creator + Immer die von Qt Creator bereitgestellte QML-Emulationsschicht verwenden + Utils::UnixTools @@ -15506,10 +15518,6 @@ Qt Creator kann sich nicht anhängen. Reset Debugger Debugger zurücksetzen - - Shift+Ctrl+R - Shift+Ctrl+R - Ctrl+Shift+O Ctrl+Shift+O @@ -28511,6 +28519,10 @@ Entfernt: %4 Use %1 instead of 'var' or 'variant' to improve performance. Zur Steigerung der Ausführungsgeschwindigkeit sollte %1 an Stelle von 'var' oder 'variant' verwendet werden. + + This type is not supported as a root element by Qt Quick Designer %1. + Dieser Typ wird von Qt Quick Designer %1 nicht als Wurzelelement unterstützt. + Do not use "%1" as a constructor. "%1" darf nicht als Konstruktor verwendet werden. @@ -31330,6 +31342,14 @@ Kurznamen können verwendet werden, sofern sie eindeutig sind. Qt Quick 2.2 Qt Quick 2.2 + + Creates a Qt Quick 2 UI project with a single QML file that contains the main view. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of project. Requires Qt 5.3 or newer. + Erstellt ein Qt Quick 2-UI-Projekt mit einer einzigen QML-Datei, die die Hauptansicht enthält. Sie können Qt Quick 2-UI-Projekte mit QML-Scene ohne Erstellung betrachten. Sie benötigen keine Entwicklungsumgebung auf Ihrem Computer, um solche Projekte zu erstellen und auszuführen. Erfordert Qt 5.3 oder neuer. + + + Qt Quick 2.3 + Qt Quick 2.3 + Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.2 or newer. Erstellt ein Qt Quick 2-UI-Projekt mit einer einzigen QML-Datei, die die Hauptansicht enthält und Qt Quick Controls verwendet. Sie können Qt Quick 2-UI-Projekte mit QML-Scene ohne Erstellung betrachten. Dieses Projekt erfordert, dass die Qt Quick Controls für die Qt-Version installiert sind. Erfordert Qt 5.2 oder neuer. @@ -31338,6 +31358,14 @@ Kurznamen können verwendet werden, sofern sie eindeutig sind. Qt Quick Controls 1.1 Qt Quick Controls 1.1 + + Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.3 or newer. + Erstellt ein Qt Quick 2-UI-Projekt mit einer einzigen QML-Datei, die die Hauptansicht enthält und Qt Quick Controls verwendet. Sie können Qt Quick 2-UI-Projekte mit QML-Scene ohne Erstellung betrachten. Dieses Projekt erfordert, dass die Qt Quick Controls für die Qt-Version installiert sind. Erfordert Qt 5.3 oder neuer. + + + Qt Quick Controls 1.2 + Qt Quick Controls 1.2 + Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls. You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version. Requires Qt 5.1 or newer. Erstellt ein Qt Quick 2-UI-Projekt mit einer einzigen QML-Datei, die die Hauptansicht enthält und Qt Quick Controls verwendet. Sie können Qt Quick 2-UI-Projekte mit QML-Scene ohne Erstellung betrachten. Dieses Projekt erfordert, dass die Qt Quick Controls für die Qt-Version installiert sind. Erfordert Qt 5.1 oder neuer. @@ -35188,6 +35216,14 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü Qt Quick 2.2 Qt Quick 2.2 + + Creates a deployable Qt Quick 2 application using the QtQuick 2.3 import. Requires Qt 5.3 or newer. + Erstellt eine zum Deployment geeignete Qt Quick 2-Anwendung unter Verwendung des Imports QtQuick 2.3. Erfordert Qt 5.3 oder neuer. + + + Qt Quick 2.3 + Qt Quick 2.3 + Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.2 or newer. Erstellt eine zum Deployment geeignete Qt Quick 2-Anwendung unter Verwendung der Qt Quick Controls. Erfordert Qt 5.2 oder neuer. @@ -35196,6 +35232,14 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü Qt Quick Controls 1.1 Qt Quick Controls 1.1 + + Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.3 or newer. + Erstellt eine zum Deployment geeignete Qt Quick 2-Anwendung unter Verwendung der Qt Quick Controls. Erfordert Qt 5.3 oder neuer. + + + Qt Quick Controls 1.2 + Qt Quick Controls 1.2 + Creates a deployable Qt Quick 2 application using Qt Quick Controls. Requires Qt 5.1 or newer. Erstellt eine zum Deployment geeignete Qt Quick 2-Anwendung unter Verwendung der Qt Quick Controls. Erfordert Qt 5.1 oder neuer. @@ -37290,8 +37334,8 @@ Dieser Assistent führt Sie durch die wesentlichen Schritte, die zum Deployment TabViewSpecifics - TabView - TabView + Tab View + Tab View Current index @@ -39148,4 +39192,86 @@ Möchten Sie, dass Qt Creator sie für Ihr Projekt (%1) anlegt? '%1' kann nicht geöffnet werden. + + SliderSpecifics + + Value + Wert + + + Current value of the Slider. The default value is 0.0. + Aktueller Wert des Sliders. Die Voreinstellung ist 0,0. + + + Maximum value + Maximalwert + + + Maximum value of the slider. The default value is 1.0. + Maximalwert des Sliders. Die Voreinstellung ist 1,0. + + + Minimum value + Minimalwert + + + Minimum value of the slider. The default value is 0.0. + Der Minimalwert des Sliders. Die Voreinstellung ist 0,0. + + + Orientation + Ausrichtung + + + Layout orientation of the slider. + Ausrichtung des Sliders. + + + Step size + Schrittweite + + + Indicates the slider step size. + Legt die Größe der Schritte fest. + + + Active focus on press + Fokussieren durch Betätigen + + + Indicates whether the slider should receive active focus when pressed. + Legt fest, ob der Slider durch Betätigen den Fokus erhalten soll. + + + Tick marks enabled + Skalenmarkierungen aktiviert + + + Indicates whether the slider should display tick marks at step intervals. + Legt fest, ob der Slider Skalenmarkierungen an den möglichen Werten anzeigen soll. + + + Update value while dragging + Wert beim Ziehen aktualisieren + + + Determines whether the current value should be updated while the user is moving the slider handle, or only when the button has been released. + Legt fest, ob der aktuelle Wert aktualisiert werden soll, während der Benutzer den Slider verschiebt, oder nur aktulisiert wird, wenn er losgelassen wird. + + + + SplitViewSpecifics + + Split View + Split View + + + Orientation + Ausrichtung + + + Orientation of the split view. + Ausrichtung des Split View. + + diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 87703ed11e0e7f3f3406fd998aba9b6167dc5ffa..348a91da7116c7f3713f97e88ff913a9fe8d41c3 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -479,12 +479,18 @@ QList LocatorWidget::filtersFor(const QString &text, QString & void LocatorWidget::updateCompletionList(const QString &text) { m_updateRequested = true; + if (m_entriesWatcher->future().isRunning()) { + // Cancel the old future. We may not just block the UI thread to wait for the search to + // actually cancel, so try again when the finshed signal of the watcher ends up in + // updateEntries() (which will call updateCompletionList again with the + // requestedCompletionText) + m_requestedCompletionText = text; + m_entriesWatcher->future().cancel(); + return; + } + QString searchText; const QList filters = filtersFor(text, searchText); - - // cancel the old future - m_entriesWatcher->future().cancel(); - QFuture future = QtConcurrent::run(runSearch, filters, searchText); m_entriesWatcher->setFuture(future); } @@ -493,8 +499,9 @@ void LocatorWidget::updateEntries() { m_updateRequested = false; if (m_entriesWatcher->future().isCanceled()) { - // reset to usable state - m_acceptRequested = false; + const QString text = m_requestedCompletionText; + m_requestedCompletionText.clear(); + updateCompletionList(text); return; } diff --git a/src/plugins/coreplugin/locator/locatorwidget.h b/src/plugins/coreplugin/locator/locatorwidget.h index a7e6021f6b1da5f88d79dbb3affd902633311804..dca841b82b809ee0eea1e90757de607fdae31bad 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.h +++ b/src/plugins/coreplugin/locator/locatorwidget.h @@ -94,6 +94,7 @@ private: QTimer *m_showPopupTimer; QFutureWatcher *m_entriesWatcher; QMap m_filterActionMap; + QString m_requestedCompletionText; bool m_updateRequested; bool m_acceptRequested; bool m_possibleToolTipRequest; diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp index ce8b73c4bc7da0805961495d86d84b9b8651a8d7..d3211841fb3e6c8918a9f81dfd3e74a2abeb5d47 100644 --- a/src/plugins/cpptools/cpptoolsreuse.cpp +++ b/src/plugins/cpptools/cpptoolsreuse.cpp @@ -117,7 +117,7 @@ bool isOwnershipRAIIType(CPlusPlus::Symbol *symbol, const LookupContext &context bool isValidAsciiIdentifierChar(const QChar &ch) { - return ch.isLetterOrNumber() || ch == QLatin1Char(' '); + return ch.isLetterOrNumber() || ch == QLatin1Char('_'); } bool isValidFirstIdentifierChar(const QChar &ch) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 1179561bce964ab2eee041848b7648385f8eb57d..f1098c6a23214363a1e157c3e9b41d1cbf36a2e8 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -131,6 +131,16 @@ using namespace Core; using namespace Utils; +static QString QString_toUpper(const QString &str) +{ + return str.toUpper(); +} + +static QString QString_toLower(const QString &str) +{ + return str.toLower(); +} + namespace TextEditor { namespace Internal { diff --git a/src/tools/3rdparty/iossim/coresimulator/coresimulator.h b/src/tools/3rdparty/iossim/coresimulator/coresimulator.h new file mode 100644 index 0000000000000000000000000000000000000000..d38805ace4199d56a236e0fad5b55748578e57af --- /dev/null +++ b/src/tools/3rdparty/iossim/coresimulator/coresimulator.h @@ -0,0 +1,451 @@ +// +// Generated by class-dump 3.5 (64 bit). +// +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. +// + +#pragma mark Function Pointers and Blocks + +typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown + +typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown + +#pragma mark Named Structures + +/*struct CGSize { + double width; + double height; +};*/ + +#pragma mark - + +// +// File: $(DEVELOPER_DIR)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator +// UUID: C7A40E7B-B10C-3CB4-85F5-42071E2E5C4C +// +// Arch: x86_64 +// Current version: 84.0.0 +// Compatibility version: 1.0.0 +// Source version: 84.0.0.0.0 +// Minimum Mac OS X version: 10.9.0 +// SDK version: 10.9.0 +// +// Objective-C Garbage Collection: Unsupported +// + +@protocol OS_dispatch_queue; +@protocol OS_xpc_object; +@protocol SimBridge; +@class SimDevice; +@class SimDeviceSet; +@class SimDeviceType; +@class SimRuntime; +@class SimDeviceNotificationManager; +@class SimServiceConnectionManager; + +@protocol SimDeviceNotifier +- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; +- (unsigned long long)registerNotificationHandlerOnQueue:(NSObject *)arg1 handler:(void (^)(NSDictionary *))arg2; +- (unsigned long long)registerNotificationHandler:(void (^)(NSDictionary *))arg1; +@end + +@interface NSArray (argv) +- (void)freeArgv:(char **)arg1; +- (char **)argv; +@end + +@interface NSDictionary (envp) +- (void)freeEnvp:(char **)arg1; +- (char **)envp; +@end + +@interface NSError (SimError) ++ (id)errorFromXPCDict:(id)arg1; ++ (id)errorWithSimErrno:(int)arg1 localizedDescription:(id)arg2; ++ (id)errorWithSimErrno:(int)arg1 userInfo:(id)arg2; ++ (id)errorWithSimErrno:(int)arg1; +- (id)xpcDict; +@end + +@interface NSString (cputype) ++ (id)stringForCPUType:(int)arg1; +- (int)cputype; +@end + +@interface NSUserDefaults (SimDefaults) ++ (id)simulatorDefaults; +@end + +@interface SimDevice : NSObject +{ + unsigned long long _state; + NSString *_name; + NSDictionary *_uiWindowProperties; + SimDeviceType *_deviceType; + SimRuntime *_runtime; + NSUUID *_UDID; + SimDeviceSet *_deviceSet; + SimServiceConnectionManager *_connectionManager; + NSString *_setPath; + SimDeviceNotificationManager *_notificationManager; + NSObject *_bootstrapQueue; + NSMutableDictionary *_registeredServices; + NSObject *_stateVariableQueue; + NSMachPort *_deathTriggerPort; + NSMachPort *_hostSupportPort; + NSMachPort *_simBridgePort; + NSDistantObject *_simBridgeDistantObject; +} + ++ (id)simDevice:(id)arg1 UDID:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4 state:(unsigned long long)arg5 connectionManager:(id)arg6 setPath:(id)arg7; ++ (id)simDeviceAtPath:(id)arg1; ++ (id)createDeviceWithName:(id)arg1 setPath:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4; ++ (BOOL)isValidState:(unsigned long long)arg1; +@property(retain, nonatomic) NSDistantObject *simBridgeDistantObject; // @synthesize simBridgeDistantObject=_simBridgeDistantObject; +@property(retain, nonatomic) NSMachPort *simBridgePort; // @synthesize simBridgePort=_simBridgePort; +@property(retain, nonatomic) NSMachPort *hostSupportPort; // @synthesize hostSupportPort=_hostSupportPort; +@property(retain) NSMachPort *deathTriggerPort; // @synthesize deathTriggerPort=_deathTriggerPort; +@property(retain) NSObject *stateVariableQueue; // @synthesize stateVariableQueue=_stateVariableQueue; +@property(retain) NSMutableDictionary *registeredServices; // @synthesize registeredServices=_registeredServices; +@property(retain) NSObject *bootstrapQueue; // @synthesize bootstrapQueue=_bootstrapQueue; +@property(retain) SimDeviceNotificationManager *notificationManager; // @synthesize notificationManager=_notificationManager; +@property(copy) NSString *setPath; // @synthesize setPath=_setPath; +@property(retain) SimServiceConnectionManager *connectionManager; // @synthesize connectionManager=_connectionManager; +@property(readonly) SimDeviceSet *deviceSet; // @synthesize deviceSet=_deviceSet; +@property(copy) NSUUID *UDID; // @synthesize UDID=_UDID; +@property(retain) SimRuntime *runtime; // @synthesize runtime=_runtime; +@property(retain) SimDeviceType *deviceType; // @synthesize deviceType=_deviceType; +//- (void).cxx_destruct; +- (BOOL)isAvailableWithError:(id *)arg1; +@property(readonly) BOOL available; +- (int)launchApplicationWithID:(id)arg1 options:(id)arg2 error:(id *)arg3; +- (void)launchApplicationAsyncWithID:(id)arg1 options:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; +- (id)installedAppsWithError:(id *)arg1; +- (BOOL)applicationIsInstalled:(id)arg1 type:(id *)arg2 error:(id *)arg3; +- (BOOL)uninstallApplication:(id)arg1 withOptions:(id)arg2 error:(id *)arg3; +- (BOOL)installApplication:(id)arg1 withOptions:(id)arg2 error:(id *)arg3; +- (BOOL)setKeyboardLanguage:(id)arg1 error:(id *)arg2; +- (BOOL)addPhoto:(id)arg1 error:(id *)arg2; +- (BOOL)openURL:(id)arg1 error:(id *)arg2; +- (void)simBridgeSync:(CDUnknownBlockType)arg1; +- (void)simBridgeAsync:(CDUnknownBlockType)arg1; +- (void)simBridgeCommon:(CDUnknownBlockType)arg1; +- (long long)compare:(id)arg1; +- (id)newDeviceNotification; +- (id)createXPCNotification:(const char *)arg1; +- (id)createXPCRequest:(const char *)arg1; +- (void)handleXPCRequestSpawn:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestGetenv:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestLookup:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestRegister:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestRestore:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestUpdateUIWindow:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestErase:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestUpgrade:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestShutdown:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestBoot:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequestRename:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequest:(id)arg1 peer:(id)arg2; +- (void)handleXPCNotificationDeviceUIWindowPropertiesChanged:(id)arg1; +- (void)handleXPCNotificationDeviceRenamed:(id)arg1; +- (void)handleXPCNotificationDeviceStateChanged:(id)arg1; +- (void)handleXPCNotification:(id)arg1; +@property(copy) NSDictionary *uiWindowProperties; +@property(copy) NSString *name; +@property unsigned long long state; +- (id)stateString; +- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; +- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; +- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; +- (void)simulateMemoryWarning; +- (id)memoryWarningFilePath; +@property(readonly, copy) NSString *logPath; +- (id)dataPath; +- (id)devicePath; +- (id)environment; +- (int)_spawnFromSelfWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; +- (int)_spawnFromLaunchdWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; +- (int)spawnWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; +- (void)spawnAsyncWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 completionHandler:(CDUnknownBlockType)arg4; +- (BOOL)registerPort:(unsigned int)arg1 service:(id)arg2 error:(id *)arg3; +- (unsigned int)lookup:(id)arg1 error:(id *)arg2; +- (unsigned int)_lookup:(id)arg1 error:(id *)arg2; +- (id)getenv:(id)arg1 error:(id *)arg2; +- (BOOL)restoreContentsAndSettingsFromDevice:(id)arg1 error:(id *)arg2; +- (void)restoreContentsAndSettingsAsyncFromDevice:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (BOOL)updateUIWindowProperties:(id)arg1 error:(id *)arg2; +- (void)updateAsyncUIWindowProperties:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (void)_sendUIWindowPropertiesToDevice; +- (BOOL)eraseContentsAndSettingsWithError:(id *)arg1; +- (void)eraseContentsAndSettingsAsyncWithCompletionHandler:(CDUnknownBlockType)arg1; +- (BOOL)upgradeToRuntime:(id)arg1 error:(id *)arg2; +- (void)upgradeAsyncToRuntime:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (BOOL)rename:(id)arg1 error:(id *)arg2; +- (void)renameAsync:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (BOOL)shutdownWithError:(id *)arg1; +- (BOOL)_shutdownWithError:(id *)arg1; +- (void)shutdownAsyncWithCompletionHandler:(CDUnknownBlockType)arg1; +- (BOOL)bootWithOptions:(id)arg1 error:(id *)arg2; +- (void)bootAsyncWithOptions:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (void)launchdDeathHandlerWithDeathPort:(id)arg1; +- (BOOL)startLaunchdWithDeathPort:(id)arg1 deathHandler:(CDUnknownBlockType)arg2 error:(id *)arg3; +- (void)registerPortsWithLaunchd; +@property(readonly) NSArray *launchDaemonsPaths; +- (BOOL)removeLaunchdJobWithError:(id *)arg1; +- (BOOL)createLaunchdJobWithError:(id *)arg1 extraEnvironment:(id)arg2; +- (BOOL)clearTmpWithError:(id *)arg1; +- (BOOL)ensureLogPathsWithError:(id *)arg1; +- (BOOL)supportsFeature:(id)arg1; +@property(readonly, copy) NSString *launchdJobName; +- (void)saveToDisk; +- (id)saveStateDict; +- (void)validateAndFixState; +@property(readonly, copy) NSString *descriptiveName; +- (id)description; +- (void)dealloc; +- (id)initDevice:(id)arg1 UDID:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4 state:(unsigned long long)arg5 connectionManager:(id)arg6 setPath:(id)arg7; + +@end + +@interface SimDeviceNotificationManager : NSObject +{ + NSObject *_handlersQueue; + NSMutableDictionary *_handlers; + unsigned long long _next_regID; + NSObject *_sendQueue; +} + +@property(retain) NSObject *sendQueue; // @synthesize sendQueue=_sendQueue; +@property unsigned long long next_regID; // @synthesize next_regID=_next_regID; +@property(retain) NSMutableDictionary *handlers; // @synthesize handlers=_handlers; +@property(retain) NSObject *handlersQueue; // @synthesize handlersQueue=_handlersQueue; +//- (void).cxx_destruct; +- (void)sendNotification:(id)arg1; +- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; +- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; +- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; +- (void)dealloc; +- (id)init; + +@end + +@interface SimDeviceSet : NSObject +{ + NSString *_setPath; + NSObject *_devicesQueue; + NSMutableDictionary *__devicesByUDID; + NSMutableDictionary *_devicesNotificationRegIDs; + SimServiceConnectionManager *_connectionManager; + SimDeviceNotificationManager *_notificationManager; +} + ++ (id)setForSetPath:(id)arg1; ++ (id)defaultSet; ++ (id)defaultSetPath; +@property(retain) SimDeviceNotificationManager *notificationManager; // @synthesize notificationManager=_notificationManager; +@property(retain) SimServiceConnectionManager *connectionManager; // @synthesize connectionManager=_connectionManager; +@property(retain) NSMutableDictionary *devicesNotificationRegIDs; // @synthesize devicesNotificationRegIDs=_devicesNotificationRegIDs; +@property(retain) NSMutableDictionary *_devicesByUDID; // @synthesize _devicesByUDID=__devicesByUDID; +@property(retain) NSObject *devicesQueue; // @synthesize devicesQueue=_devicesQueue; +@property(copy) NSString *setPath; // @synthesize setPath=_setPath; +//- (void).cxx_destruct; +- (void)handleXPCRequestDeleteDevice:(id)arg1 peer:(id)arg2 device:(id)arg3; +- (void)handleXPCRequestCreateDevice:(id)arg1 peer:(id)arg2; +- (void)handleXPCRequest:(id)arg1 peer:(id)arg2; +- (void)handleXPCNotificationDeviceRemoved:(id)arg1; +- (void)handleXPCNotificationDeviceAdded:(id)arg1; +- (void)handleXPCNotification:(id)arg1; +- (BOOL)deleteDevice:(id)arg1 error:(id *)arg2; +- (void)deleteDeviceAsync:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; +- (id)createDeviceWithType:(id)arg1 runtime:(id)arg2 name:(id)arg3 error:(id *)arg4; +- (void)createDeviceAsyncWithType:(id)arg1 runtime:(id)arg2 name:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; +- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; +- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; +- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; +- (void)removeDeviceAsync:(id)arg1; +- (void)addDevice:(id)arg1; +- (void)addDeviceAsync:(id)arg1; +- (void)updateDefaultDevices; +- (id)defaultCreatedPlistPath; +@property(readonly, copy) NSArray *availableDevices; +@property(readonly, copy) NSArray *devices; +@property(readonly, copy) NSDictionary *devicesByUDID; +- (id)description; +- (void)dealloc; +- (id)initWithSetPath:(id)arg1; + +@end + +@interface SimDeviceType : NSObject +{ + float _mainScreenScale; + unsigned int _minRuntimeVersion; + unsigned int _maxRuntimeVersion; + NSString *_name; + NSString *_identifier; + NSString *_modelIdentifier; + NSBundle *_bundle; + NSArray *_supportedArchs; + NSArray *_supportedProductFamilyIDs; + NSDictionary *_capabilities; + NSString *_springBoardConfigName; + NSString *_productClass; + NSDictionary *_environment_extra; + NSDictionary *_aliases; + NSDictionary *_supportedFeatures; + NSDictionary *_supportedFeaturesConditionalOnRuntime; + struct CGSize _mainScreenSize; + struct CGSize _mainScreenDPI; +} + ++ (id)supportedDeviceTypesByName; ++ (id)supportedDeviceTypesByAlias; ++ (id)supportedDeviceTypesByIdentifier; ++ (id)supportedDeviceTypes; ++ (id)supportedDevices; +@property(copy) NSDictionary *supportedFeaturesConditionalOnRuntime; // @synthesize supportedFeaturesConditionalOnRuntime=_supportedFeaturesConditionalOnRuntime; +@property(copy) NSDictionary *supportedFeatures; // @synthesize supportedFeatures=_supportedFeatures; +@property(copy) NSDictionary *aliases; // @synthesize aliases=_aliases; +@property(copy) NSDictionary *environment_extra; // @synthesize environment_extra=_environment_extra; +@property(copy) NSString *productClass; // @synthesize productClass=_productClass; +@property(copy) NSString *springBoardConfigName; // @synthesize springBoardConfigName=_springBoardConfigName; +@property unsigned int maxRuntimeVersion; // @synthesize maxRuntimeVersion=_maxRuntimeVersion; +@property unsigned int minRuntimeVersion; // @synthesize minRuntimeVersion=_minRuntimeVersion; +@property struct CGSize mainScreenDPI; // @synthesize mainScreenDPI=_mainScreenDPI; +@property struct CGSize mainScreenSize; // @synthesize mainScreenSize=_mainScreenSize; +@property(copy) NSDictionary *capabilities; // @synthesize capabilities=_capabilities; +@property float mainScreenScale; // @synthesize mainScreenScale=_mainScreenScale; +@property(copy) NSArray *supportedProductFamilyIDs; // @synthesize supportedProductFamilyIDs=_supportedProductFamilyIDs; +@property(copy) NSArray *supportedArchs; // @synthesize supportedArchs=_supportedArchs; +@property(retain) NSBundle *bundle; // @synthesize bundle=_bundle; +@property(copy) NSString *modelIdentifier; // @synthesize modelIdentifier=_modelIdentifier; +@property(copy) NSString *identifier; // @synthesize identifier=_identifier; +@property(copy) NSString *name; // @synthesize name=_name; +//- (void).cxx_destruct; +- (Class)deviceClass; +- (long long)compare:(id)arg1; +- (BOOL)supportsFeatureConditionally:(id)arg1; +- (BOOL)supportsFeature:(id)arg1; +- (id)environmentForRuntime:(id)arg1; +- (id)environment; +@property(readonly, copy) NSString *productFamily; +@property(readonly) int productFamilyID; +- (id)description; +- (void)dealloc; +- (id)initWithBundle:(id)arg1; +- (id)initWithPath:(id)arg1; +- (id)init; + +@end + +@interface SimRuntime : NSObject +{ + unsigned int _version; + unsigned int _minHostVersion; + unsigned int _maxHostVersion; + NSString *_name; + NSString *_identifier; + NSBundle *_bundle; + NSString *_root; + NSString *_versionString; + NSString *_buildVersionString; + NSDictionary *_supportedFeatures; + NSDictionary *_supportedFeaturesConditionalOnDeviceType; + NSDictionary *_requiredHostServices; + NSString *_platformPath; + NSArray *_supportedProductFamilyIDs; + NSDictionary *_environment_extra; + void *_libLaunchHostHandle; + NSDictionary *_aliases; +} + ++ (id)supportedRuntimesByAlias; ++ (id)supportedRuntimesByIdentifier; ++ (id)supportedRuntimes; +@property unsigned int maxHostVersion; // @synthesize maxHostVersion=_maxHostVersion; +@property unsigned int minHostVersion; // @synthesize minHostVersion=_minHostVersion; +@property(copy) NSDictionary *aliases; // @synthesize aliases=_aliases; +@property(nonatomic) void *libLaunchHostHandle; // @synthesize libLaunchHostHandle=_libLaunchHostHandle; +@property(copy) NSDictionary *environment_extra; // @synthesize environment_extra=_environment_extra; +@property(copy) NSArray *supportedProductFamilyIDs; // @synthesize supportedProductFamilyIDs=_supportedProductFamilyIDs; +@property(copy) NSString *platformPath; // @synthesize platformPath=_platformPath; +@property(copy) NSDictionary *requiredHostServices; // @synthesize requiredHostServices=_requiredHostServices; +@property(copy) NSDictionary *supportedFeaturesConditionalOnDeviceType; // @synthesize supportedFeaturesConditionalOnDeviceType=_supportedFeaturesConditionalOnDeviceType; +@property(copy) NSDictionary *supportedFeatures; // @synthesize supportedFeatures=_supportedFeatures; +@property unsigned int version; // @synthesize version=_version; +@property(copy) NSString *buildVersionString; // @synthesize buildVersionString=_buildVersionString; +@property(copy) NSString *versionString; // @synthesize versionString=_versionString; +@property(copy) NSString *root; // @synthesize root=_root; +@property(retain) NSBundle *bundle; // @synthesize bundle=_bundle; +@property(copy) NSString *identifier; // @synthesize identifier=_identifier; +@property(copy) NSString *name; // @synthesize name=_name; +//- (void).cxx_destruct; +- (id)platformRuntimeOverlay; +- (CDUnknownFunctionPointerType)launch_sim_set_death_handler; +- (CDUnknownFunctionPointerType)launch_sim_waitpid; +- (CDUnknownFunctionPointerType)launch_sim_spawn; +- (CDUnknownFunctionPointerType)launch_sim_getenv; +- (CDUnknownFunctionPointerType)launch_sim_bind_session_to_port; +- (CDUnknownFunctionPointerType)launch_sim_find_endpoint; +- (CDUnknownFunctionPointerType)launch_sim_register_endpoint; +- (BOOL)isAvailableWithError:(id *)arg1; +@property(readonly) BOOL available; +- (BOOL)verifyRuntime; +- (id)dyld_simPath; +- (BOOL)createInitialContentPath:(id)arg1 error:(id *)arg2; +- (void)createInitialContentPath:(id)arg1; +- (id)sampleContentPath; +- (long long)compare:(id)arg1; +- (BOOL)supportsFeatureConditionally:(id)arg1; +- (BOOL)supportsFeature:(id)arg1; +- (BOOL)supportsDeviceType:(id)arg1; +- (BOOL)supportsDevice:(id)arg1; +- (id)environment; +- (id)description; +- (void)dealloc; +- (id)initWithBundle:(id)arg1; +- (id)initWithPath:(id)arg1; +- (id)init; + +@end + +@interface SimServiceConnectionManager : NSObject +{ + NSObject *_serviceConnection; + NSObject *_serviceConnectionQueue; + NSDate *_lastConnectionTime; +} + ++ (void)useService:(BOOL)arg1; ++ (id)sharedConnectionManager; +@property(retain) NSDate *lastConnectionTime; // @synthesize lastConnectionTime=_lastConnectionTime; +@property(retain) NSObject *serviceConnectionQueue; // @synthesize serviceConnectionQueue=_serviceConnectionQueue; +@property(retain) NSObject *serviceConnection; // @synthesize serviceConnection=_serviceConnection; +//- (void).cxx_destruct; +- (void)handleXPCEvent:(id)arg1; +- (void)dealloc; +- (BOOL)connect; +- (id)init; + +@end + +@interface SimVerifier : NSObject +{ + NSObject *_serviceConnection; + NSObject *_serviceConnectionQueue; +} + ++ (id)verificationError:(int)arg1; ++ (id)connectionError; ++ (id)sharedVerifier; +@property(retain) NSObject *serviceConnectionQueue; // @synthesize serviceConnectionQueue=_serviceConnectionQueue; +@property(retain) NSObject *serviceConnection; // @synthesize serviceConnection=_serviceConnection; +//- (void).cxx_destruct; +- (id)verifyDyldSim:(id)arg1; +- (id)verifyAll; +- (BOOL)verifyAllWithError:(id *)arg1; +- (void)dealloc; +- (id)init; + +@end + diff --git a/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h b/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h index 70cc4ac4366293b872ac0d605f4c954d3df5d4b1..7f83f4b37f7e2af36bec9558baff52f4635f22f6 100644 --- a/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h +++ b/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h @@ -1,3 +1,5 @@ +#import "../coresimulator/coresimulator.h" + // // Generated by class-dump 3.5 (64 bit). // @@ -242,6 +244,8 @@ typedef void (^CDUnknownBlockType)(void); // return type and parameters are unkn @property(copy) DTiPhoneSimulatorSystemRoot *simulatedSystemRoot; // @synthesize simulatedSystemRoot=_simulatedSystemRoot; @property(copy) NSString *localizedClientName; // @synthesize localizedClientName=_localizedClientName; @property BOOL launchForBackgroundFetch; // @synthesize launchForBackgroundFetch=_launchForBackgroundFetch; +@property(retain) SimDevice *device; // @synthesize device=_device; +@property(retain) SimRuntime *runtime; // @synthesize runtime=_runtime; - (id)description; - (id)copyWithZone:(struct _NSZone *)arg1; - (id)init; @@ -263,6 +267,7 @@ typedef void (^CDUnknownBlockType)(void); // return type and parameters are unkn @property(copy) NSString *sdkDisplayName; // @synthesize sdkDisplayName; @property(copy) NSString *sdkVersion; // @synthesize sdkVersion; @property(copy) NSString *sdkRootPath; // @synthesize sdkRootPath; +@property(readonly) SimRuntime *runtime; // @synthesize runtime=_runtime; - (id)description; - (long long)compare:(id)arg1; - (id)copyWithZone:(struct _NSZone *)arg1; @@ -287,4 +292,4 @@ typedef void (^CDUnknownBlockType)(void); // return type and parameters are unkn - (id)description; - (id)copyWithZone:(struct _NSZone *)arg1; -@end \ No newline at end of file +@end diff --git a/src/tools/3rdparty/iossim/iossim.pro b/src/tools/3rdparty/iossim/iossim.pro index 0e3f94122e3d9923d28998ea59b6b27f66572e5c..413ad342ff21acd6fd77758eada844fec0d1c0e8 100644 --- a/src/tools/3rdparty/iossim/iossim.pro +++ b/src/tools/3rdparty/iossim/iossim.pro @@ -50,7 +50,8 @@ HEADERS += \ nsprintf.h \ nsstringexpandpath.h \ version.h \ - dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h + dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h \ + coresimulator/coresimulator.h DISTFILES = IOSSIM_LICENSE \ Info.plist diff --git a/src/tools/3rdparty/iossim/iphonesimulator.h b/src/tools/3rdparty/iossim/iphonesimulator.h index 3049f318d2d1c9a868784b7cb8018dacdd85c75b..da4a626ebddee4bc8c13eece83eec032f38989a4 100644 --- a/src/tools/3rdparty/iossim/iphonesimulator.h +++ b/src/tools/3rdparty/iossim/iphonesimulator.h @@ -24,6 +24,8 @@ BOOL alreadyPrintedData; BOOL retinaDevice; BOOL tallDevice; + BOOL is64BitDevice; + NSString *deviceTypeId; } - (id)init; @@ -34,6 +36,7 @@ - (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path; - (void)stop; - (void)doExit:(int)errorCode; -- (NSString*)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice; +- (SimDevice*) findDeviceWithFamily:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit; +- (NSString*)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit; @end diff --git a/src/tools/3rdparty/iossim/iphonesimulator.mm b/src/tools/3rdparty/iossim/iphonesimulator.mm index 40425775d9b63d7695f81395bacd890460207e8c..7845a7af4619e08b8abb512c7fc9e134f2942e7c 100644 --- a/src/tools/3rdparty/iossim/iphonesimulator.mm +++ b/src/tools/3rdparty/iossim/iphonesimulator.mm @@ -18,15 +18,30 @@ NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator"; NSString *deviceProperty = @"SimulateDevice"; NSString *deviceIphoneRetina3_5Inch = @"iPhone Retina (3.5-inch)"; NSString *deviceIphoneRetina4_0Inch = @"iPhone Retina (4-inch)"; +NSString *deviceIphoneRetina4_0Inch_64bit = @"iPhone Retina (4-inch 64-bit)"; NSString *deviceIphone = @"iPhone"; NSString *deviceIpad = @"iPad"; NSString *deviceIpadRetina = @"iPad Retina"; +NSString *deviceIpadRetina_64bit = @"iPad Retina (64-bit)"; + +NSString* deviceTypeIdIphone4s = @"com.apple.CoreSimulator.SimDeviceType.iPhone-4s"; +NSString* deviceTypeIdIphone5 = @"com.apple.CoreSimulator.SimDeviceType.iPhone-5"; +NSString* deviceTypeIdIphone5s = @"com.apple.CoreSimulator.SimDeviceType.iPhone-5s"; +NSString* deviceTypeIdIpad2 = @"com.apple.CoreSimulator.SimDeviceType.iPad-2"; +NSString* deviceTypeIdIpadRetina = @"com.apple.CoreSimulator.SimDeviceType.iPad-Retina"; +NSString* deviceTypeIdIpadAir = @"com.apple.CoreSimulator.SimDeviceType.iPad-Air"; +NSString* deviceTypeIdResizableIphone = @"com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone"; +NSString* deviceTypeIdResizeableIpad = @"com.apple.CoreSimulator.SimDeviceType.Resizable-iPad"; // The path within the developer dir of the private Simulator frameworks. -NSString* const kSimulatorFrameworkRelativePath = @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; +NSString* const kSimulatorFrameworkRelativePathLegacy = @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; +NSString* const kSimulatorFrameworkRelativePath = @"../SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; NSString* const kDVTFoundationRelativePath = @"../SharedFrameworks/DVTFoundation.framework"; NSString* const kDevToolsFoundationRelativePath = @"../OtherFrameworks/DevToolsFoundation.framework"; //NSString* const kSimulatorRelativePath = @"Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"; +NSString* const kCoreSimulatorRelativePath = @"Library/PrivateFrameworks/CoreSimulator.framework"; + +static pid_t gDebuggerProcessId; static const char *gDevDir = 0; @@ -88,6 +103,14 @@ static const char *gDevDir = 0; nsprintf(@"Unable to devToolsFoundationPath. Error: "); return ; } + NSString* coreSimulatorPath = [developerDir stringByAppendingPathComponent:kCoreSimulatorRelativePath]; + if ([[NSFileManager defaultManager] fileExistsAtPath:coreSimulatorPath]) { + NSBundle* coreSimulatorBundle = [NSBundle bundleWithPath:coreSimulatorPath]; + if (![coreSimulatorBundle load]){ + nsprintf(@"Unable to coreSimulatorPath. Error: "); + return ; + } + } // Prime DVTPlatform. NSError* error; Class DVTPlatformClass = [self FindClassByName:@"DVTPlatform"]; @@ -95,7 +118,10 @@ static const char *gDevDir = 0; nsprintf(@"Unable to loadAllPlatformsReturningError. Error: %@",[error localizedDescription]); return ; } - NSString* simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePath]; + NSString* simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePathLegacy]; + if (![[NSFileManager defaultManager] fileExistsAtPath:simBundlePath]){ + simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePath]; + } NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath]; if (![simBundle load]){ nsprintf(@"Unable to load simulator framework. Error: %@",[error localizedDescription]); @@ -115,20 +141,20 @@ NSString* FindDeveloperDir() { NSString* developerDir = [env objectForKey:@"DEVELOPER_DIR"]; if ([developerDir length] > 0) return developerDir; - + // Go look for it via xcode-select. NSTask* xcodeSelectTask = [[[NSTask alloc] init] autorelease]; [xcodeSelectTask setLaunchPath:@"/usr/bin/xcode-select"]; [xcodeSelectTask setArguments:[NSArray arrayWithObject:@"-print-path"]]; - + NSPipe* outputPipe = [NSPipe pipe]; [xcodeSelectTask setStandardOutput:outputPipe]; NSFileHandle* outputFile = [outputPipe fileHandleForReading]; - + [xcodeSelectTask launch]; NSData* outputData = [outputFile readDataToEndOfFile]; [xcodeSelectTask terminate]; - + NSString* output = [[[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding] autorelease]; @@ -143,6 +169,7 @@ NSString* FindDeveloperDir() { fprintf(stdout, "\n"); fprintf(stdout, "Commands:\n"); fprintf(stdout, " showsdks List the available iOS SDK versions\n"); + fprintf(stdout, " showdevicetypes List the available device types (Xcode6+)\n"); fprintf(stdout, " launch <application path> Launch the application at the specified path on the iOS Simulator\n"); fprintf(stdout, " start Launch iOS Simulator without an app\n"); fprintf(stdout, "\n"); @@ -156,9 +183,11 @@ NSString* FindDeveloperDir() { fprintf(stdout, " --debug Attach LLDB to the application on startup\n"); fprintf(stdout, " --use-gdb Use GDB instead of LLDB. (Requires --debug)\n"); fprintf(stdout, " --sdk <sdkversion> The iOS SDK version to run the application on (defaults to the latest)\n"); + fprintf(stdout, " --devicetypeid The id of the device type that should be simulated (Xcode6+)\n"); fprintf(stdout, " --family <device family> The device type that should be simulated (defaults to `iphone')\n"); fprintf(stdout, " --retina Start a retina device\n"); fprintf(stdout, " --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n"); + fprintf(stdout, " --64bit In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit))\n"); fprintf(stdout, " --uuid <uuid> A UUID identifying the session (is that correct?)\n"); fprintf(stdout, " --env <environment file path> A plist file containing environment key-value pairs that should be set\n"); fprintf(stdout, " --setenv NAME=VALUE Set an environment variable\n"); @@ -187,6 +216,18 @@ NSString* FindDeveloperDir() { return EXIT_SUCCESS; } +- (int) showDeviceTypes { + Class simDeviceSet = NSClassFromString(@"SimDeviceSet"); + if (simDeviceSet) { + SimDeviceSet* deviceSet = [simDeviceSet defaultSet]; + NSArray* devices = [deviceSet availableDevices]; + for (SimDevice* device in devices) { + nsfprintf(stderr, @"%@", device.deviceType.identifier); + } + } + + return EXIT_SUCCESS; +} - (void)session:(DTiPhoneSimulatorSession *)session didEndWithError:(NSError *)error { if (verbose) { @@ -210,6 +251,14 @@ NSString* FindDeveloperDir() { [self doExit:EXIT_SUCCESS]; } +static void IgnoreSignal(int /*arg*/) { +} + +static void ChildSignal(int /*arg*/) { + int status; + waitpid(gDebuggerProcessId, &status, 0); + exit(EXIT_SUCCESS); +} - (void)session:(DTiPhoneSimulatorSession *)session didStart:(BOOL)started withError:(NSError *)error { if (startOnly && session) { @@ -242,6 +291,9 @@ NSString* FindDeveloperDir() { [self doExit:EXIT_FAILURE]; return; } + gDebuggerProcessId = child_pid; + signal(SIGINT, IgnoreSignal); + signal(SIGCHLD, ChildSignal); } if (verbose) { msgprintf(@"Session started"); @@ -400,9 +452,15 @@ NSString* FindDeveloperDir() { [config setSimulatedDeviceFamily:[NSNumber numberWithInt:1]]; } } - - NSString* devicePropertyValue = [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice]; - [config setSimulatedDeviceInfoName:devicePropertyValue]; + + if ([config respondsToSelector:@selector(setDevice:)]) { + // Xcode6+ + config.device = [self findDeviceWithFamily:family retina:retinaDevice isTallDevice:tallDevice is64Bit:is64BitDevice]; + } else { + // Xcode5 or older + NSString* devicePropertyValue = [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice is64Bit:is64BitDevice]; + [config setSimulatedDeviceInfoName:devicePropertyValue]; + } /* Start the session */ session = [[[[self FindClassByName:@"DTiPhoneSimulatorSession"] alloc] init] autorelease]; @@ -420,18 +478,70 @@ NSString* FindDeveloperDir() { return EXIT_SUCCESS; } -- (NSString*) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice { +- (SimDevice*) findDeviceWithFamily:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit { + NSString* devTypeId = self->deviceTypeId; + + if (!devTypeId) { + devTypeId = deviceTypeIdIphone5; + if (retina) { + if ([family isEqualToString:@"ipad"]) { + if (is64Bit) { + devTypeId = deviceTypeIdIpadAir; + } else { + devTypeId = deviceTypeIdIpadRetina; + } + } else { + if (isTallDevice) { + if (is64Bit) { + devTypeId = deviceTypeIdIphone5s; + } else { + devTypeId = deviceTypeIdIphone5; + } + } else { + devTypeId = deviceTypeIdIphone4s; + } + } + } else { + if ([family isEqualToString:@"ipad"]) { + devTypeId = deviceTypeIdIpad2; + } else { + devTypeId = deviceTypeIdIphone4s; + } + } + } + + SimDeviceSet* deviceSet = [[self FindClassByName:@"SimDeviceSet"] defaultSet]; + NSArray* devices = [deviceSet availableDevices]; + for (SimDevice* device in devices) { + SimDeviceType* type = device.deviceType; + if ([type.identifier isEqualToString:devTypeId]) { + return device; + } + } + // Default to whatever is the first device + return [devices count] > 0 ? [devices objectAtIndex:0] : nil; +} + +- (NSString*) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit { NSString *devicePropertyValue; if (retina) { if (verbose) { msgprintf(@"using retina"); } if ([family isEqualToString:@"ipad"]) { - devicePropertyValue = deviceIpadRetina; + if (is64Bit) { + devicePropertyValue = deviceIpadRetina_64bit; + } else { + devicePropertyValue = deviceIpadRetina; + } } else { if (isTallDevice) { - devicePropertyValue = deviceIphoneRetina4_0Inch; + if (is64Bit) { + devicePropertyValue = deviceIphoneRetina4_0Inch_64bit; + } else { + devicePropertyValue = deviceIphoneRetina4_0Inch; + } } else { devicePropertyValue = deviceIphoneRetina3_5Inch; } @@ -461,9 +571,11 @@ NSString* FindDeveloperDir() { retinaDevice = NO; tallDevice = NO; + is64BitDevice = NO; exitOnStartup = NO; alreadyPrintedData = NO; startOnly = strcmp(argv[1], "start") == 0; + deviceTypeId = nil; nsprintf(@""); for (int i = 0; i < argc; ++i) { @@ -494,6 +606,9 @@ NSString* FindDeveloperDir() { if (strcmp(argv[1], "showsdks") == 0) { [self LoadSimulatorFramework:developerDir]; exit([self showSDKs]); + } else if (strcmp(argv[1], "showdevicetypes") == 0) { + [self LoadSimulatorFramework:developerDir]; + exit([self showDeviceTypes]); } else if (strcmp(argv[1], "launch") == 0 || startOnly) { if (strcmp(argv[1], "launch") == 0 && argc < 3) { msgprintf(@"Missing application path argument"); @@ -570,6 +685,9 @@ NSString* FindDeveloperDir() { } else if (strcmp(argv[i], "--uuid") == 0) { i++; uuid = [NSString stringWithUTF8String:argv[i]]; + } else if (strcmp(argv[i], "--devicetypeid") == 0) { + i++; + deviceTypeId = [NSString stringWithUTF8String:argv[i]]; } else if (strcmp(argv[i], "--setenv") == 0) { i++; NSArray *parts = [[NSString stringWithUTF8String:argv[i]] componentsSeparatedByString:@"="]; @@ -599,6 +717,8 @@ NSString* FindDeveloperDir() { retinaDevice = YES; } else if (strcmp(argv[i], "--tall") == 0) { tallDevice = YES; + } else if (strcmp(argv[i], "--64bit") == 0) { + is64BitDevice = YES; } else if (strcmp(argv[i], "--args") == 0) { i++; break; diff --git a/src/tools/3rdparty/iossim/version.h b/src/tools/3rdparty/iossim/version.h index d22dd94b8eefe4f4eac752b65e46f4ccb01fcf42..9a7e0c34532380d305278b719421ccf128452286 100644 --- a/src/tools/3rdparty/iossim/version.h +++ b/src/tools/3rdparty/iossim/version.h @@ -1 +1 @@ -#define IOS_SIM_VERSION "1.9.0" +#define IOS_SIM_VERSION "2.0.1" diff --git a/tests/system/suite_CSUP/tst_CSUP06/test.py b/tests/system/suite_CSUP/tst_CSUP06/test.py index 03af0318f48fbfe6bdfbf6a1ca5e16c3945b2885..03076d18435d6bb217d644e117106f45af0f263a 100644 --- a/tests/system/suite_CSUP/tst_CSUP06/test.py +++ b/tests/system/suite_CSUP/tst_CSUP06/test.py @@ -149,6 +149,7 @@ def checkSymbolCompletion(editor, isClangCodeModel): propShown = waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 2500) test.compare(not propShown, symbol in missing, "Proposal widget is (not) shown as expected (%s)" % symbol) + found = [] if propShown: proposalListView = waitForObject(':popupFrame_Proposal_QListView') found = dumpItems(proposalListView.model())