summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios
Commit message (Collapse)AuthorAgeFilesLines
* Avoid repeated QByteArray creation when resolving opengl functionsLars Knoll2016-03-012-3/+3
| | | | | | | | | | Add an getProcAddress(const char *) overload to QOpenGLContext, and refactor the QPA interface to take a const char *. Like this we can avoid lots of mallocs when resoving GL methods. Change-Id: Ic45b985fbaa0da8d32ba3e3b485351173352ca6f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Updated license headersJani Heikkinen2016-01-1547-658/+940
| | | | | | | | | | | 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.6' into devSimon Hausmann2016-01-122-5/+9
|\ | | | | | | Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
| * iOS: fix crash on iOS 8 due to unsupported selectorRichard Moe Gustavsen2016-01-112-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-2/+4
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * Fixed crash on iOS devices due to unsupported selector.Harald Meyer2016-01-061-2/+4
| | | | | | | | | | | | | | | | Added check for traiCollection selector. Task-number: QTBUG-50159 Change-Id: Ie3efafe9e22e59aef862a681ad733f2bb0a5ba49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-183-6/+81
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * iOS: Clear focusObject if first responder is set to nullMarkus Goetz2015-12-171-1/+5
| | | | | | | | | | | | | | | | In certain cases we were still showing a cursor in a TextInput even though the keyboard was hidden programmatically. Change-Id: I48ebb6b8bc0382236b1ea5835e68eae48ece2b4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: Don't hide keyboard on "Done" button when focus object has changedMarkus Goetz2015-12-171-0/+8
| | | | | | | | | | | | | | | | | | | | If the focus object changed programmatically for example to the next input field in a window, we want to keep the keyboard open. This strangely only worked if the inputs had different IM hints because this made the keyboard appear again. Change-Id: I52e66bb7d2ff97ae7084173769d9b5c2d0c549b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: notify application when edit menu is closedRichard Moe Gustavsen2015-12-171-0/+17
| | | | | | | | | | | | | | | | | | The edit menu will also close if the user taps outside it, not only when selecting a menu item. But we never caught this case, which left QMenu to belive that it was still open. Change-Id: Iae071b4fc5fdc44d7d05b4dd767042907e337957 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: include marked text when reporting IM textInRange and endOfDocumentRichard Moe Gustavsen2015-12-171-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [UITextInput textInRange] is sparsely documented, but it turns out that unconfirmed marked text should be seen as a part of the text document. This is different from Qt IM (ImSurroundingText), which handles marked text on the side. The reason we can assume this is that the range we are given as argument to textInRange exceeds the documents length when having marked text appended to the end, suggesting that it tries to read / verify the current marked text. In addition, keyboards like Japanese-Kana will not update and function correctly unless marked text is included. Note that the docs seems to imply that you cannot have marked text and text selection at the same time, unless the selection is contained within the marked text (using the dedicated selectedRange argument to setMarkedText). If this turns out to be incorrect, we might need to adjust the methods dealing with selection to also include marked text as well. Task-number: QTBUG-49946 Change-Id: Ifedd792ec66db435806f57fca157e1abbbf121a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Fix broken QIOSContext setup due to missing 0-initialization of EAGLContextTor Arne Vestbø2015-12-101-3/+4
| | | | | | | | | | | | Change-Id: Ia4dbb2e3b055a7899c4a3e02698c5776ea7f73ea Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * iOS: filter edit menu actions depending on selection stateRichard Moe Gustavsen2015-12-091-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | When showing an edit menu on iOS, UIKit will always populate the menu with actions according to what the current first responder supports. But it doesn't make sense to show all the actions every time the menu opens, so introduce some filtering depending on selection state. Change-Id: I943a09928233a3a10de003fe15ed8fd8b6fc1e18 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: support edit action 'select'Richard Moe Gustavsen2015-12-091-0/+7
| | | | | | | | | | | | | | | | | | Now that we don't populate the edit menu from qtquickcontrols anymore (because of shortcut issues), report to UIKit that we support select so that the action shows in the menu. Change-Id: I92508da4e1789c361d778cc6c1c77c86308f4c73 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Favor OpenGLES 3 on iOS if availableMike Krus2015-12-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | First tries OpenGLES 3 context since it’s strictly compatible with OpenGLES 2. If it fails, then try 2. This is required to use QOpenGLFramebufferObject::blitFramebuffer without having to look at using an Apple-specific extension. Change-Id: I01f8f058fa82e7f2c90d1b894ad36f3d3939c994 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-173-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | iOS: Switch backingstore to use raster paint engine, not GLTor Arne Vestbø2015-12-172-85/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that more of the raster operations are NEON-optimized this should be acceptable. The switch enables antialiased drawing, and makes iOS in line with other platforms in having QBackingStore backed by a QImage. The use of QImage also allows us to remove code from the backingstore implementation that was only needed to support the composeAndFlush code path. The common parts of a raster backingstore implementation have been factored out into QRasterBackingStore in platformsupport, which can be shared with more platforms in the future. [ChangeLog][iOS] QBackingStore now uses the raster paint engine instead of the OpenGL paint engine, enabling improved antialiased drawing. In case of performance regressions, the old code path can be enabled by setting the window's surface type to QSurface::OpenGLSurface. Task-number: QTBUG-35271 Change-Id: Ia300b9a5edf8dc0b4bfb99d84ed3c23a8523c267 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-081-0/+2
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * Respond with a sound for certain message boxes on windowsJan Arve Saether2015-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression (it worked in 4.8) that was probably introduced by the refactoring of the accessibility framework in Qt 5. Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called regardless of isActive(), so its the responsibility of each implementation of notifyAccessibilityUpdate() to check for isActive() where it matters. Task-number: QTBUG-33303 Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-271-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_p.h src/network/ssl/qsslsocket_mac.cpp src/network/ssl/qsslsocket_mac_p.h src/widgets/kernel/qwidget.cpp Change-Id: I39592cb37d710dfaf8640769ba3c1b637927d7f4
| | * iOS: always flush spontaneous key press eventsRichard Moe Gustavsen2015-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we changed sending key events through QPA instead of directly to the focus object, we only flushed from deleteBackward (06be9f026). The reason was to avoid unnecessary flushes, as this in general can be a source to recursion problems. It turns out that this is also needed when sending Qt::Key_Return. The reason is that we sometimes resign first responder when the return key is pressed, which will also change the focus object in Qt. And without flushing the key event first, it will be processed after the change and therefore end up at the wrong object. It seems like the most sensible thing is to always flush upon receiving spontaneous key/text events from iOS, which is also how it was before. Task-number: QTBUG-49021 Change-Id: I44885a11275dee5039ef6a8abbcbdadc092695e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-272-6/+33
|\| | | | | | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * | iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devicesTor Arne Vestbø2015-11-262-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.6' into devLiang Qi2015-11-232-11/+16
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * | iOS: Update pixel density (PPI) logic to detect new iOS devicesTor Arne Vestbø2015-11-192-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the iPhone 6(S) Plus devices have a PPI of 401, we change the logic from storing the unscaled PPI to storing the scaled PPI, and applying that to a scaled geometry when computing the physical size. Task-number: QTBUG-49467 Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581 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.6' into devLiang Qi2015-11-181-14/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
| * | iOS: only force-finish start-up from file engine when on main threadRichard Moe Gustavsen2015-11-091-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The authorization dialog that grants the application access to the assets will only show after returning back from applicationDidFinishLaunching. Therefore, trying to load an asset from main before qApp->exec() would normally fail. To remedy that, we added a path that starts a QEventLoop for a split second to force the application init process to finish. But this can only work if we start it from the main thread. A bug with this is seen in QML FileDialog, since it (clumsy enough) starts to iterate, in a separate thread, all the files in its currently set directory upon start-up construction (which should be fixed as well). The result is that the application gets dead-locked on start-up. Change-Id: I0047272d53314752903960b33f88b33dc0d7e78d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | iOS: add support for native message dialogsRichard Moe Gustavsen2015-11-164-2/+209
| | | | | | | | | | | | | | | | | | | | | This patch will add support for native message dialogs on iOS. Change-Id: Iba2237b371ccbdfe4c772d25c3ea925eb64e5a0c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | iOS: refactor removeMnemonics(const QString &) to QPlatformThemeRichard Moe Gustavsen2015-11-042-39/+2
|/ / | | | | | | | | | | | | | | This function is needed across several OS', so refactor it out to a common place. Change-Id: I35b957029c965672739d03cd2db3e87f5bd0acdf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Move QEventDispatcherCoreFoundation to QtCoreMorten Johan Sørvig2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export it for use by the iOS platform plugin. Also move QCFSocketNotifier, and export for use by the Cocoa platform plugin. This is a pure code move with no intended behavior changes, in anticipation of using the Core Foundation event dispatcher as the default Qt Core event dispatcher on OS X. Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Make the CoreFoundation event dispatcher depend on QtCore onlyMorten Johan Sørvig2015-10-132-0/+22
| | | | | | | | | | | | | | | | | | | | In anticipation of moving it to QtCore. The call to QWindowSystemInterface::sendWindowSystemEvents() has been moved to QIOSEventDispatcher by making processPostedEvents() virtual. Change-Id: I9e03be4153a9f5f34e9a0ac942cdff572a44c318 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-025-17/+224
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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: silence compiler warning about unimplemented 'selectionRectsForRange'Richard Moe Gustavsen2015-09-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | Implement a dummy method to silence the compiler. After testing, this method seems to never be called. Which is good, since the current IM API in Qt have little to offer to resolve what is being asked. Until a need arise, we just return an empty array. Change-Id: I573eb8205a7e635a46d487ae175fb46e3a602001 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: filter responder actions from menu syncRichard Moe Gustavsen2015-09-041-1/+1
| | | | | | | | | | | | | | | | | | Follow up from b494d85. We need to filter the responder actions after a sync as well, otherwise they will be added back if a menu item e.g changes text. Change-Id: I2ecbcc292400ada97a8e29d4b97f087349d8a061 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: compose key events from QKeySequencesRichard Moe Gustavsen2015-09-041-10/+18
| | | | | | | | | | | | | | | | | | Instead of hard-coding the key and modifier that should trigger a shortcut, we read it out from the QKeySequence that corresponds to a StandardKey instead. Change-Id: I6325534d3ff91c788d7e660d9009954e437b8534 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: handle all directions when calculating positionFromPositionRichard Moe Gustavsen2015-09-011-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method is currently a bit buggy, since it does not take UITextLayoutDirectionUp and UITextLayoutDirectionDown into account. This patch is mostly for fixing something "just in case", since we so far have not seen UIKit calling this method for those directions unless a hardware keyboard is connected. And in that case, we anyway override IM navigation by dealing with the arrow keys explicit. Since IM in Qt does not support getting the position above or below the current position, we just return the current position, making it a no-op. Change-Id: I4bcb9e2a00ab4e3d785058d7ff7f4855142dabbc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: filter first responder actions from edit menuRichard Moe Gustavsen2015-09-012-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | UIResponderStandardEditActions found in first responder will be prepended to the edit menu automatically (or e.g made available as buttons on the virtual keyboard). So we filter them out to avoid duplicates, and let first responder handle the actions instead. In case of QIOSTextResponder, edit actions will be converted to key events that ends up triggering the shortcuts of the filtered menu items. Change-Id: I046c6cc5b358d8a6f7623e10579e2dcd92f75139 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: store shortcut sequence in menu itemRichard Moe Gustavsen2015-09-012-1/+7
| | | | | | | | | | Change-Id: I4c99516fb98ce0da84b8690cc4c1fd71c0db9dca Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: add undo/redo supportRichard Moe Gustavsen2015-09-011-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the undo/redo buttons on the keyboard, as well as the Cmd-Z/Cmd-Shift-Z shortcuts. For UIKit to support this, we need to add undo actions to first responders undo manager. Since we don't know if Qt has anything to undo/redo, we just enable the shortcuts all the time. To do that, we trick NSUndoManager to always have both an undo operation and a redo operation in the stack. Change-Id: I3294a962cc24f56585e7e515856142f3dda56d0a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: listen for standard text edit shortcutsRichard Moe Gustavsen2015-09-011-0/+18
| | | | | | | | | | | | | | | | | | Catch the missing shortcuts sent by UIKit, and forward them to Qt as key events so that the app can respond to them. Change-Id: If63c4b05466e64843982fce32fbd594d2a0ef312 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: send arrow keys to Qt to handle cursor movementRichard Moe Gustavsen2015-09-012-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Controlling cursor position through input methods in Qt is very limited. You cannot e.g move the cursor vertically, or select text that spans several paragraphs. The reason for the latter is that Qt works with input methods on a per-paragraph basis, which effectively locks UIKit to only being able to move the cursor and select text within a single paragraph. Fixing up input methods to support more advanced navigation means changing the whole design (working on a whole document, instead of per paragraph), and is out of scope. Instead we choose to listen for arrow keys and forward them to Qt in the same fashing as we already do for backspace and enter. This will make the iOS port on-par with the other platforms, which also sends control characters like these on the side of IM events. Note that registering shortcuts and overriding default IM navigation behavior will only take effect when a hardware keyboard is connected. Only then will [UIresponder keyCommands] be called from UIKit. Change-Id: I634205e0578447c4aa6e9fdff342ee3b281901ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: send key events through QPARichard Moe Gustavsen2015-09-011-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | So far we have chosen to send key events directly to the focus object since we do already do that for IM events. But Qt expects key events (especially control keys) to be sendt through QPA. This means that key events can end up somewhere else than at the focus object, which is expected and needed if shortcut propagation is to work. Change-Id: I160bf3309572719eda352cdb11b46c4b5a455e0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * 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-262-10/+45
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: ensure that we restore text selection with correct cursor and anchor posRichard Moe Gustavsen2015-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | Qt keeps track of the selection direction since a selection anchor can be placed both to the left or to the right of the cursor. On iOS, the selection should instead always be specified from left to right (using a position together with a positive length). So when restoring the selection after performing the calculation of the text rect, we need to ensure that we follow this format. Change-Id: Id8bea6c35e2781e1431ee963f601b6e9ef05dbf5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: support cut/copy/paste shortcuts when using Bluetooth keyboardRichard Moe Gustavsen2015-08-111-8/+42
| | | | | | | | | | Change-Id: Iaa602771227f64c3a477a27656362a361f78e8dd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>