summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosviewcontroller.mm
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-021-3/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * iOS: Guard all uses of APIs not available in application extensionsTor Arne Vestbø2018-06-051-3/+7
| | | | | | | | | | Change-Id: Ic058a0c07f6cdd0a015f46db96fce1536a712711 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-201-0/+14
|\| | | | | | | Change-Id: I0bea38585382b5d9c8d7a013bf6bcb3a6008d159
| * iOS: Trigger manual layout of root view controller when coming out of backgroundTor Arne Vestbø2018-04-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When rotating the device when the application is in the background iOS will ask the root view controller to layout its views when then foregrounding the application, but at that point the application state is still in the suspended state, meaning we block any view resizing or rendering. To ensure the views are resized correctly, we trigger a manual layout after the application comes out of the suspended state. Task-number: QTBUG-67719 Change-Id: I1ef0a4133d4b94edaac7b0f3cb4e49e367eb76d4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Clean up our Objective-C usageJake Petroules2018-02-201-19/+17
|/ | | | | | | | | | | | | | | | - Move ivars into @implementation - Use instancetype where applicable - Use dot notation for property access - Use subscript operator for dictionaries and arrays - Format selectors consistently - Use proper style for init methods - Use generics instead of void pointers where possible - Use "range for" loops instead of indexing - Replace or replace IBAction/IBOutlet with void Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| * iOS: Ignore view layouts while in the backgroundTor Arne Vestbø2017-12-061-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite the OpenGL ES Programming Guide telling us to avoid all use of OpenGL while in the background, iOS will perform its view snapshotting for the app switcher after the application has been backgrounded; once for each orientation. Presumably the expectation is that no rendering needs to be done to provide an alternate orientation snapshot, just relayouting of views. But in our case, or any non-stretchable content case such as a OpenGL based game, this is not true. Instead of continuing layout, which will send potentially expensive geometry changes (with isExposed false, since we're in the background), we short-circuit the snapshotting. iOS will still use the latest rendered frame to create the application switcher thumbnail, but it will be based on the last active orientation of the application. To ensure that we pick up the right geometry when rotating the device while the app is in the background, we treat applicationWillEnterForeground as Qt::ApplicationInactive, which matches the recommendations of the OpenGL ES Programming Guide to "re-create any objects and restart your animation timers". Change-Id: Ia9c27f85f996ecf30284c825b43447aa7099224e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | iOS: Use environment variables for debug flags instead of QObject propertiesTor Arne Vestbø2017-11-281-2/+1
| | | | | | | | | | | | | | | | The former is more idiomatic in Qt, and doesn't require as much boilerplate to set up. Change-Id: Idf03af4018611c8eb3b31af90da72f9d85617b2c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Make QWindow's windowState a QFlags of the WindowStateOlivier Goffart2017-03-161-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | This reflects QWidget API, and restores some behavior from Qt4. Some WM can have several state at the same time. On Plasma for example, when a window is both maximized and minimized, the "maximized" checkbox is checked from the taskbar entry. The API of QPlatformWindow was changed to take a QFlag and the platform plugins were adapted. - On XCB: Always send the full state to the WM. And read the full state. - On Windows: The code was originally written with '&' in Qt4, and was changed to == when porting. Some adaptation had to be made so the states would be preserved. - On macOS: Only a single state can be set and is reported back for now, with the possibly to expand this in the future. - Other platforms: Just do as before with the effective state. Task-number: QTBUG-57882 Task-number: QTBUG-52616 Task-number: QTBUG-52555 Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix tvOS buildJake Petroules2016-10-161-0/+2
| | | | | Change-Id: I128605050b68787f8c9671f4aa8de0a1667301d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-0/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-211-0/+4
| |\ | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | * iOS: explicit synthesize properties as readwriteRichard Moe Gustavsen2016-09-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The synthesized properties were defined as (read only) methods in the UIViewController API in iOS9, and we extended them into readwrite properties in our own sub class to enable some local bookkeeping in addition to normal overriding. But in iOS10, Apple has changed the methods into being readonly properties instead. The difference then is that automatic property synthesizing will ignore our local readwrite declarations, and use the declarations in the super class instead. And this will lead to a runtime crash on iOS10 since no setter methods are generated. This patch will instead explicit synthesize the affected properties to ensure that both getters and setters will be generated. Change-Id: Iac330e991b8a0fe335e383e1f7d9ff30c0ce1559 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Fix namespaced build on iOSJake Petroules2016-09-201-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I682fabe8891e0325e6545b4499a59af4ad584c41 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-5/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-5/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
| | * uikit: Call base class implementation of rotation callbacksTor Arne Vestbø2016-06-101-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Apple documentation explicitly says that you should call super when implementing these methods. Change-Id: I584bb140a4a5bde88927b379ab19158a78c6fea9 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Remove all code paths related to unsupported Apple platforms.Jake Petroules2016-06-041-48/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the minimum deployment target (and thus SDK) is 10.9 for OS X and 7.0 for iOS, all code paths affecting platform versions lower than the aforementioned are removed. Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Add support for Apple tvOSMike Krus2016-05-171-1/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* / Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * iOS: Make setFrame in desktop view take superview transforms into accountTor Arne Vestbø2015-08-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An assumption we do for the QIOSDesktopManagerView is that it should always cover the whole UIWindow. To achieve that, we override setFrame to be stop any attempt from UIKit to make our view smaller, e.g. when the statusbar changes height. In case the view is not a direct child of the window, we need to take any transformations into account when computing the new frame. This happens e.g. during presentation of other view-controllers, where our view is temporarily reparented into a UITransitionView that may have a transform set. Task-number: QTBUG-47506 Change-Id: I388143f2cbb566541ffb1068443ce21e62ea2b42 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | iOS: Restore mirror mode using [UIScreen mainScreen] instead of nilTor Arne Vestbø2015-09-091-1/+1
| | | | | | | | | | | | | | | | | | The latter had the same effect, but is an invalid assignment for a value that is documented to be non-nil. Change-Id: Ice00482138481556ad839bc3721e577dafcb26fe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * iOS: calculate bounds in desktop view using transformed window bounds for ↵Richard Moe Gustavsen2015-08-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | both width and height Depending on the orientation, UIKit might shrink either the width or the height of the view to fit the status bar. Since we anyway want the view to fill the whole window, we simply ignore this, and use the bounds of the whole window directly. Task-number: QTBUG-47506 Change-Id: I73294e5792f8d98fb0c0b0a42198207baca08e3c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | iOS: Clean up style in Objective-C message signaturesTor Arne Vestbø2015-05-241-3/+3
|/ | | | | | | | | | - Space between class/instance signifier - No space between return type and message name - No space in message arguments Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* iOS: Update statusbar style based on MaximizeUsingFullscreenGeometryHintTor Arne Vestbø2015-03-271-13/+17
| | | | | | | | | | | | When Qt::MaximizeUsingFullscreenGeometryHint is enabled for the focus window we are likely to have window content under the statusbar, in which case we revert to the default iOS statusbar style which is black text. If this style doesn't fit the user application, the style can be set in the Info.plist, or progammatically using native APIs, in combination with UIViewControllerBasedStatusBarAppearance = NO. Change-Id: I97576ae091bbfcb8718f980c25e91cc7ca605f03 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Add platform plugin option to debug window managementTor Arne Vestbø2015-03-161-0/+51
| | | | | | | | | | | | When the 'debugWindowManagement' option is enabled, e.g. by passing the argument -platform ios:debugWindowManagement to the application, the plugin will add a background color and outline to all QUIViews, as well as draw a grid for the underlying QUIViewController. This makes it easier to see where windows are placed when the window itself doesn't draw anything, e.g. in unit tests. Change-Id: If9a59822e0b320b154ad8e338f9fb5ec7cf191a2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: Handle an QIOSViewController outliving its related QIOSScreenTor Arne Vestbø2015-03-101-1/+1
| | | | | | | | | | | We release the UIWindow that retains QIOSViewController in the QIOSScreen destructor, but other parts of the OS may have retained the view controller, so the dealloc may not happen until later. In the meantime we may receive calls to shouldAutorotate, so we need to guard this code for the situation that m_screen has been deleted. Change-Id: Iefeb75f4fc698b5e80417ffd3a971b7de625bcd5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* iOS: Track QIOSViewController -> QIOSScreen using QPointerTor Arne Vestbø2015-02-021-3/+4
| | | | | | | | | We may receive viewWillLayoutSubviews calls for the view controller even if QIOSScreen has released the UIWindow that retains the view controller. Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Disconnect focusWindowChanged connection on QIOSViewController deallocTor Arne Vestbø2015-02-021-1/+8
| | | | | | Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Limit auto-rotation to device screen (excludes external screens)Tor Arne Vestbø2015-01-241-1/+1
| | | | | | | | | | | An external screen should always stay in the native orientation of the screen, and not be affected by rotations of the device. If the user requires the external content to follow the device rotation, this can be done explicitly by listening to orientation changes of the main screen, or using QSensors. Change-Id: I3a98655d11915f0db107930e7d97a24417656bc9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Track QPlatformScreen -> QScreen using QPointerTor Arne Vestbø2015-01-241-0/+3
| | | | | | | | | | Allows the QPlatformScreen to verify that the QScreen is alive before sending events to QPA for the given screen (which will assert if the screen is being destroyed). Change-Id: Ie77674fead3e0a4d4f6fedbf1f7f3c98364c7485 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Associate UIScreen and show UIWindow on initial QWindow mappingTor Arne Vestbø2015-01-231-7/+43
| | | | | | | | | | | | We delay showing the UIWindow until the first QWindow is created and mapped to the screen. This allows external screens to stay in mirror mode until a QWindow has been explicitly created on that screen. We also remove the screen-association when the last QWindow on that screen has been removed, which will return the external screen to mirror mode. Change-Id: Iccecb297281d0c4f397f69f2494debff051ade01 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Base [QIOSViewController shouldAutorotate] on the locked orientationTor Arne Vestbø2015-01-231-10/+10
| | | | | | | | | Instead of keeping a separate property for the auto-rotation. Allows us to override shouldAutorotate later on to make the decision even more fine grained. Change-Id: I9a3cd6c1316f2a5485a94ef8d9b633df87f46f5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Ignore statusbar changes for windows on external screensTor Arne Vestbø2015-01-231-0/+5
| | | | | Change-Id: Ib7919abb2da324f6ffa058e8b215bf566ff43e40 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Don't re-apply window state during QIOSWindow constructionTor Arne Vestbø2015-01-231-1/+5
| | | | | | | | | | | We set the parent of the window as part of constructing it, which will cause a layout of the QIOSDesktopManagerView's subviews, but in this case we don't need to re-set the window state as that's taken care of later on in the QIOSWindow constructor. Change-Id: Ic197c9a50394908c8aa2155abdc97bc322937a85 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Prevent recursion when updating/syncing QIOSViewController propertiesTor Arne Vestbø2015-01-091-0/+12
| | | | | | Change-Id: I22f1eaa892cba23c498ae210a9a483e468268581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Fix QWindow::reportContentOrientationChange on iOS6+Tor Arne Vestbø2015-01-091-13/+80
| | | | | | | | | | | | | On iOS 6 and above, [UIViewController supportedInterfaceOrientations] needs to return 0 for [UIApplication setStatusBarOrientation] to work. This means once you report a content orientation other than the primary orientation, you'll disable auto-rotation. Reporting the orientation as Qt::PrimaryOrientation restores the auto-rotation behavior. Change-Id: I1b8c765c507728fdbc5b828e0b4215324014e221 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Move implementation details of QIOSViewController to class extensionTor Arne Vestbø2015-01-081-0/+6
| | | | | | Change-Id: I602d8f1c9f20d3bfed4db3405460021146b546d8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Raise window level instead of hiding statusbar during VKB scrollTor Arne Vestbø2015-01-071-7/+1
| | | | | | | | | | | | | | | | | | Hiding the statusbar using the normal iOS APIs result in QScreen reporting new availableGeometry, which is not what we want. The scroll of the screen is a purely visual effect, and shouldn't have any effect on observable Qt APIs besides the keyboard rect changing. Instead of actually hiding the statusbar, we achieve the same effect by raising the key window (and any other application windows, including the keyboard) to the level of the statusbar, effectively putting them above the statusbar. This still leaves popups and alert windows above the key window, as normal. Change-Id: Ib7694240ca86cfb9000de35bf0c49343ffb37e32 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Fade out statusbar when scrolling view due to VKBTor Arne Vestbø2014-10-201-41/+49
| | | | | Change-Id: I86923a2b2aa2d17d79ba3a11cabf37e615eaf4cc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move statusbar visibility handling to QIOSViewControllerTor Arne Vestbø2014-10-021-12/+50
| | | | | | | | | | | | | It doesn't belong in QIOScreen, and simplifies the flow when changing the focus window or the window state of the focus window. Both will result in calling updateProperties on the view-controller, which will re-configure the statusbar visibility and hide/show it as appropriate, before triggering a re-layout of its own view, which will in turn trigger an update of the screen properties based on the new statusbar state, before re-layouting of QWindow based on the new screen state. Change-Id: I89077a3fb5f843949ce833e4e727d2c753ea2eb6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't update screen properties for statusbar frame while rotatingTor Arne Vestbø2014-09-241-0/+25
| | | | | | | | | | The rotation will already result in laying out of the root viewcontroller, so we don't need to send explicit geometry changes for the statubar change. The properties of the screen at that point are also not consistent, as the screen is about to rotate. Change-Id: I1b45bee1c1224ca56f9e37068d68c4ee1bfeb9b6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Reflect changes in statusbar height as QScreen availableGeometryTor Arne Vestbø2014-09-241-0/+36
| | | | | | | | | | | We detect changes to the statusbar height, eg. when the in-call 40px tall statusbar is active, and ensure that the root viewcontroller view is laid out again with new screen properties applied. To make the layout match the animation of the statusbar height we apply the layout inside a animation block. Change-Id: I751d9d1273e833ef052a3a4f3d2777e1dffec7dd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Ensure root view controller always matches size of containing windowTor Arne Vestbø2014-09-241-0/+35
| | | | | Change-Id: I249d847a1f4785b3e63e46759baed340b0d6362e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move top level window management out of QIOSScreen to ↵Tor Arne Vestbø2014-09-241-0/+38
| | | | | | | | | | | | | | | | QIOSDesktopManagerView The logic of how to deal with top level windows in the presence of rotation or status bar changes should be confined to our custom QIOSViewController that acts as a desktop manager for regular Qt applications. We no longer treat windows with full-screen or maximized geometry but without the matching window state flag as being targeted for auto-resizing. In the future we might detect this case and warn the user that windows should have the appropriate flags to be able to auto-resize on orientation changes. Change-Id: Ibab09de5cf37e77c356fbf51a54a2fcec4bb5c51 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Update screen properties more consistentlyTor Arne Vestbø2014-09-241-5/+2
| | | | | | | | | | | Instead of updating screen properties (and hence laying out top level windows) in willAnimateRotationToInterfaceOrientation, we do it in the more catch-all viewWillLayoutSubviews, which also handles changes to the orientation while the application is in the background, as well as changes to the statusbar frame/size, eg. while being in a call. Change-Id: Ib4a08af2f3a56db426a10ff1ed819867895b5a5a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>