summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/quiview.mm
Commit message (Collapse)AuthorAgeFilesLines
* iOS: disable Apple Pencil support if configure -no-feature-tableteventShawn Rutledge2017-09-151-2/+12
| | | | | | Task-number: QTBUG-59042 Change-Id: Ia60cb01206316ae85fffac44c453803f39d3a611 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add Apple Pencil support on iOSShawn Rutledge2017-09-141-22/+62
| | | | | | | | | | | | | The Apple Pencil now generates QTabletEvents, with tilt, rotation and pressure. Predicted touches are not supported, because we don't yet have a suitable QEvent or flag for that. [ChangeLog][iOS] The Apple Pencil now generates QTabletEvents, with the complete feature set (tilt, rotation, pressure). Task-number: QTBUG-59042 Change-Id: Id58e22ac4cf8dfa80519d516c388309966f773f9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* iOS: Fix accessibility leakTor Arne Vestbø2017-08-091-2/+10
| | | | | Change-Id: I359ce521decbbb06376fc48689762f462c8706b0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Ensure all platforms send geometry events if request was not fulfilledTor Arne Vestbø2017-07-071-11/+4
| | | | | | | | | | | | | | | | | | The logic of deciding whether or not to send resize and move events has been centralized in QGuiApplication. This ensures that if a window with geometry 100,100+200x200 is moved and resized to e.g. 0,0+100x100, but the window manager denies the request (because the window would e.g. overlap with system UI), and issues a geometry update with the original geometry, 100,100+200x200, we will still treat that as warrant of a move/resize event to the application, so the application knows that its position and size is as before. [ChangeLog][Qt Gui][QPA] QWindowSystemInterfacePrivate::handleGeometryChange no longer takes the old geometry as an argument. Task-number: QTBUG-57608 Change-Id: I1d471cc7a257fef958bdb1e56184fa95489403a3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Relieve platform plugins of having to persist geometry on WM callbacksTor Arne Vestbø2017-07-071-4/+0
| | | | | | | | | We can offload this to QGuiApplication, just like the geometry of the QWindow is set. This ensures that all platforms behave the same, and that the documentation of QPlatformWindow::setGeometry is adhered. Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* iOS: Limit duration of FirstResponderCandidate to becomeFirstResponderTor Arne Vestbø2017-01-061-10/+15
| | | | | | | | | | | | We only need the FirstResponderCandidate for the duration of the call to [super becomeFirstResponder]. Keeping it around longer means that when emitting window activation events, which may result in changing the first responder again, we may wrongly conclude that we're not allowed to change the responder due to the FirstResponderCandidate still being alive. Change-Id: I8203e795cdde4128776283fe63a1907eb6ebc151 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-021-24/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS. Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/sdk.prf src/angle/src/libEGL/libEGL.pro src/platformsupport/fontdatabases/fontdatabases.pro src/platformsupport/platformsupport.pro src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro tests/auto/widgets/widgets/qmenubar/BLACKLIST tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Task-number: QTBUG-56853 Change-Id: If58785210feee3550892fc7768cce90e75a2416c
| * iOS: Take advantage of new synchronous API for QPA event deliveryTor Arne Vestbø2016-10-141-24/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using the SynchronousDelivery specialization instead of flushing all window system events, we remove the risk of flushing an event that was added without our knowledge. For example, QGuiApplicationPrivate::processMouseEvent() used to prepend a mouse move event to the QPA queue, which is why we had a check for QWidgetWindow when flushing geometry changes. processMouseEvent no longer sends the move event via the QPA queue, so that's no longer an issue, but if it were to be reintroduced, we wouldn't need to check for QWidgetWindow, as we're not flushing all events anymore. Change-Id: Ib346ea9501cd88ddda6c2137981d3eb0922192a0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-261-1/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosmessagedialog.mm Change-Id: Icfbf55c3215ec088e552d0b42a5c94d04b17c65f
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-1/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-211-1/+2
| | |\ | | | | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | | * iOS: let quiview conform to API signature changes in iOS 10Richard Moe Gustavsen2016-09-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the iOS 10 SDK, method signatures has been annotated with NS_ASSUME_NONNULL macros and 'nullable' keywords. This means that certain methods should not be called with argumens that can be null, or in this case, set to 0 explicitly. The result will be compiler warnings. This patch will rewrite the explicit call we do to touchesCancelled so that we send an empty set instead of 0. Change-Id: I50aa80b91312397d17e0e380815adff87cee852b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-211-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qcoregraphics.mm src/network/access/qnetworkrequest.h src/plugins/platforms/cocoa/qcocoahelpers.mm Change-Id: I81266414c06ea2edf63cbc7e93a86bd5d66a31a5
| * | | Fix namespaced build on iOSJake Petroules2016-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I682fabe8891e0325e6545b4499a59af4ad584c41 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | | Replace usages of QSysInfo with QOperatingSystemVersionJake Petroules2016-09-201-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Occurrences which should simply be removed entirely (due to always being true or always being false as a result of the current OS support matrix) have been left untouched for now. Change-Id: I86d5a084cb84bc28fefc5191d40924de1439b3de Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | fix build with various QT_NO_* definesNick Shaforostoff2016-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | UIKit: Handle UIPress eventsMike Krus2016-07-061-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On tvOS the system will deliver UIPress events for touch gestures on the remote such as pressing up, down, left, or right, as well as for the dedicated hardware buttons, such as menu or play/pause. We deliver these as Qt key events when possible (the siri, volume and home button can't be handled). Change-Id: Id4bd4960e3036a7b8b67cf5b9e9d653f233dc4af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | darwin: Add Foundation conversion functions for QPoint/QPointFTor Arne Vestbø2016-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromCGPoint function was left out for QPoint, as the foundation type is using CGFloats internally. Clients should use an explicit QPointF::toPoint() when potentially throwing away precision. Change-Id: I12a37e8f81c86b7ada56066cc18ee29709cc21e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | darwin: Add Foundation conversion functions for QRect/QRectFTor Arne Vestbø2016-06-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromCGRect function was left out for QRect, as the foundation type is using CGFloats internally. Clients should use an explicit QRectF::toRect() when potentially throwing away precision. Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Add support for Apple tvOSMike Krus2016-05-171-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* iOS: fix crash on iOS 8 due to unsupported selectorRichard Moe Gustavsen2016-01-111-4/+8
| | | | | | | | | | | | It turns out that f558bde was not enough to stop a crash when trying to access forceTouchCapability of traitCollection. The reason is that traitCollection is available on UIScreen starting from iOS 8, while forceTouchCapability is available on UITraitCollection starting from iOS 9. So only checking the former will cause a crash when running on iOS 8. Change-Id: I44f9fb785349694004fbf2f48fe3b85bb01d9a5a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devicesTor Arne Vestbø2015-11-261-3/+26
| | | | | | | | | | | | | | As 3D touch can be disabled/enabled at runtime on those devices, we need to watch for changes to the relevant settings and update the touch device capabilities that we report to the user. Note that iOS will deliver touchesBegan with a touch force of 0, which we will reflect/propagate as a 0 pressure, but there is no clear alternative, as we don't want to wait for a touchedMoved before sending a touch press event to Qt, just to have a valid pressure. Change-Id: I47fb8a9f98ab3244e16a337bbfcf1fe24e4c7aa2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-031-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| * iOS: remove 'truncation from double to float' compiler warningRichard Moe Gustavsen2015-05-131-1/+1
| | | | | | | | | | Change-Id: I0b4b1f062180cfe09ceb275484c39afeaaa90cac Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * ios: implement Qt::WindowTransparentForInputRichard Moe Gustavsen2015-05-061-0/+6
| | | | | | | | | | | | | | | | | | If the flag is set, report to UIKit that it should continue searching for the touch target by returning 'NO' from [UIView pointInside:]. Change-Id: I723f64fd855284fa60d0be18b2535dfa61f31381 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * ios: don't accept first responder if Qt::WindowDoesNotAcceptFocusRichard Moe Gustavsen2015-05-061-1/+1
| | | | | | | | | | Change-Id: I01801648a1971444e0727e1bf0790cb3a0d0aad5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | iOS: Clean up style in Objective-C message signaturesTor Arne Vestbø2015-05-241-2/+2
|/ | | | | | | | | | - 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: Check if window was active on setVisible(false) through native APIsTor Arne Vestbø2015-03-161-0/+17
| | | | | | | | | | | | | When a QWindow is closed and destroyed it resets QGuiApp::focus_window before calling setVisible(false) on the platform window, so we don't have the needed information anymore to check if the window we are hiding was the focus-window. To work around this we use the native state instead, which should still be valid if the window was the focus window. Change-Id: I98057e6393411471f03668e3e5ce544f6b49c01d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Add platform plugin option to debug window managementTor Arne Vestbø2015-03-161-0/+14
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * iOS: only flush non-user input events from layoutSubviewsRichard Moe Gustavsen2015-02-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change a4e1c15b1 will cause setGeometry to take immediate effect by doing a synchronuous layout and a flush. As a side-effect, the flush will also send posted touch events. So if the current setGeometry call comes from a touchMove, a touchEnd might be delivered before the touchMove returns. A crash in QToolBar drag-n-drop is seen from this. There drag data is deleted on mouse release (during the flush), while a mouse move is already handled on the stack. When the code returns to the move handler, drag-data has been deleted, and we have a crash. Since the root problem is that we flush events on a callback from the app, we can be more careful and precise by only flushing non-user input events from layoutSubviews. Change-Id: I3f5e025d774d21509ef837de9d7e85a1ac6e48cc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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: Make QIOSTextInputResponder a proper first-responder during text inputTor Arne Vestbø2014-11-031-0/+10
| | | | | | | | | Instead of faking it, by returning YES for isFirstResponder, which caused issues when iOS would try to dismiss the keyboard by resigning the true first-responder. Change-Id: I816c4cf9c699d72995ce7968e1f1a4aa9c9c167e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Detect window deactivation without waiting for next runloop iterationTor Arne Vestbø2014-10-281-17/+41
| | | | | | | | | Since we know and control whether or not we are making a new QUIView first responder, we can take not of this at that point, and use that information when another view is resigning first responder. Change-Id: I508720d418c92dc8a8011b489cc5cace8fc82633 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Don't auto-activate popup windows unless they are standaloneTor Arne Vestbø2014-10-201-1/+1
| | | | | | | | | | | | We try to emulate a traditional window manager by activating windows on touch press (before delivering the event), and on showing/hiding windows, but this logic should not apply to popup windows (including tooltips and tool windows), as they are in most cases already active through their parent or transient parent, and should not steal keyboard focus and bring the virtual keyboard down. Change-Id: If10082bd48cdf1a9e1c41d8809066e86dafd7ffc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: ensure edit menu works on iOS6Richard Moe Gustavsen2014-10-191-3/+8
| | | | | | | | | Method "- (id)targetForAction:(SEL)action withSender:(id)sender" is only available from iOS7. So change implementation to use whats available on iOS 6. Change-Id: I4e21495073364e83ef396dfab47a7ea2a23bbead Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Properly scope window deactivation on resignFirstResponderTor Arne Vestbø2014-10-031-1/+2
| | | | | | | | We were missing brackets, but luckily the only result was that we unconditionally flushed events through flushWindowSystemEvents. Change-Id: If10bcc6a07501b9fb0db891e01b8ecc9d794ab30 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move statusbar visibility handling to QIOSViewControllerTor Arne Vestbø2014-10-021-0/+10
| | | | | | | | | | | | | 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: Fix touch point translation when root view controller is offsetTor Arne Vestbø2014-09-241-13/+16
| | | | | | | | | | Instead of doing manual translation of the local touch point to global screen (QScreen) coordinates we take advantage of the fact that QWindow already has a position that's adjusted for all of the view-controller offsets in its parent hierarchy. Change-Id: Ib34173db5ac053c20712dfff469c4a1286f2a324 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Simplify QWindow/UIView geometry mappingTor Arne Vestbø2014-09-241-14/+1
| | | | | | | | | As we now have a root viewcontroller that always has a geometry that matches the containing UIWindow, we don't need to do any fancy calculations when mapping between the two. Change-Id: I08a7b9992be7b7238cbad2a2da20488bba1c0939 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Implement support for native menusRichard Moe Gustavsen2014-09-231-0/+8
| | | | | Change-Id: I2c7278697499aa046ac7b1240b7bc713ad1fc709 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Refactor text input handling to standalone responderTor Arne Vestbø2014-09-201-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of coupling the visibility of the virtual keyboard to the first-responder status of the currently active QUIView, we now treat first-responder as a separate state, tied directly to QWindow activation. This fits better with the concept of first-responders in iOS, as a UIView can become first-responder without dealing with text input, eg when dealing with touch events or menu actions. The decision point on whether or not to show the virtual keyboard is then handled by implementing the conformsToProtocol method and selectively returning YES for the UIKeyInput protocol. iOS internally calls _requiresKeyboardWhenFirstResponder on the UIResponder to determine this, but since we can't override a private method (like WKContentView in WebKit does) we have to rely on the fact that the implementation of the method uses the protocol conformance to make its decision. Once the virtual keyboard is up, we then need to react to changes to its configuration, such as keyboard type or the type of return key. Normally this would be a simple call to [view reloadInputViews], but iOS will not reload the built-in keyboards unless the UIResponder returns YES for _requiresKeyboardResetOnReload. Since we again can't override this private method (like WebKit does), we work around it by taking advantage of the fact that iOS will treat any change to the first-responder as a reason to do a keyboard reset. By using a stand-alone UIResponder for text input we can init and destroy these responders as needed, so that every call to reloadInputViews will trigger a reset, as the responder has not been seen before. We keep track of changes to the input-method-query, and detect whether or not we need to bring up a new UIResponder for text handling. As part of this refactoring we now tie the visibility of the virtual keyboard to the presence of a focus object that has input-methods enabled. This means that we automatically will track changes to input-elements through the focus changes, and reconfigure or hide the keyboard as appropriate. As a result the hide() method of QInputMethod becomes a no-op on iOS. Change-Id: I4c4834df490bc8b0bac32aeedbd819780bd5aaba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move accessibility/textinput includes in quiview.mmTor Arne Vestbø2014-09-101-4/+5
| | | | | Change-Id: Id982afb06f164bd398a6e642a48a85f277075e74 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Add helper for getting the iOS platform integration instanceTor Arne Vestbø2014-07-211-2/+1
| | | | | Change-Id: I550d345ab0f8bcba1225c425464e198d43d9fda8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Refactor qioswindow.mm into quiview.mm and quiview_accessibility.mmTor Arne Vestbø2014-07-211-0/+346
Change-Id: Ib6297e37d67b2c0ea251ae054b8ff877af2673a5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>