summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/plugin.pro
Commit message (Collapse)AuthorAgeFilesLines
* iOS: add QIOSViewControllerRichard Moe Gustavsen2013-02-271-0/+2
| | | | | | | | | | | | | We need our own viewcontroller to better control which orientations iOS can enter, and also ito be able to stop auto-rotation. We stop auto-rotation to happend by default, since this is how Qt wants it (it is seen as the responsibility of the application). Change-Id: Id07a96e355396752fffd28984af528aeb0b7c3e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add QIOSOrientationListenerRichard Moe Gustavsen2013-02-271-0/+2
| | | | | | | | QIOSScreen will use this to listen for orientation changes from UIDevice. Change-Id: I5a30f3808f8b9b885303608ce2fc1316c962898b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Set PLUGIN_TYPE = platforms before loading(qt_plugins)Tor Arne Vestbø2013-02-271-3/+1
| | | | | | | This takes care of setting INSTALLS for us, so we can skip that. Change-Id: I351cb9ec08b632fd9867d85e2c5fa59d8e5acc9d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Ensure UIApplicationMain is started before QApplication by wrapping main()Tor Arne Vestbø2013-02-271-0/+30
For the typical Qt app the developer will have an existing main() that looks something like: int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); return app.exec(); } To support this, we provide our own 'main' function in the qtmain static library that we link into the application, which calls UIApplicationMain and redirects to the 'main' function of the application after the event loop has started spinning. For this to work, the applications 'main' function needs to manually be renamed 'qt_main' for now. In a later patch, this renaming will happen automatically by redefining main from either a header file, or more likely, from the Makefile created by qmake. For the case of an iOS developer wanting to use Qt in their existing app the main will look something like: int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } This is supported right now by just linking in libqios.a without libqiosmain.a. QGuiApplication should then be created e.g inside the native apps application delegate (but QGuiApplication::exec should not be called). In the future, we plan to but use a wrapper library that brings in all the Qt dependencies into one single static library. This library will not link against qtmain, so there won't be a symbol clash if the -ObjC linker option is used. We should then add the required magic to the future Objective-C convenience wrapper for QML to bring up a QGuiApplication, which would allow using Qt from storyboards and NIBs. This would also be the place to inject our own application delegate into the mix, while proxying the delegate callbacks to the user's application delegate. Change-Id: Iba5ade114b27216be8285f36100fd735a08b9d59 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>