summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosmenu.mm
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-061-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_pre.prf mkspecs/features/qpa/genericunixfontdatabase.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf src/corelib/io/qiodevice.cpp Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-011-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_pre.prf mkspecs/macx-ios-clang/features/resolve_config.prf qtbase.pro Change-Id: I65b5ebca4942a4f295bdd4ac1568e5c347333aea
| | * iOS: hide shortcuts bar on iPad when showing menusRichard Moe Gustavsen2016-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iPad, a shortcuts bar with extra controls are shown on top of the keyboard with opertions like cut and copy. This is unwanted when using the keyboard to show menus. This patch will add extra private information to IM platform data when using menus, so that we hide the shorcuts menu when showing the custom input panel. Task-number: QTBUG-49893 Change-Id: Iaa8e1ff18acebec8be69699b3fd9470c69ab34d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-221-2/+5
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/qiosviewcontroller.mm Change-Id: I2dda31867cbc79ea7fe965f52afb518aefa4ad20
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-211-2/+5
| |\| | | | | | | | | | Change-Id: I9cfefaf22b010fca937be77979f5fb50574bb71e
| | * iOS: open menu on popup regardless of visibilityRichard Moe Gustavsen2016-09-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should be possible to show a menu by calling showPopup, even if visible is set to false. After all, it's only logical that visibility is false before showing it. And whether or not the menu is enabled should not matter as well. Change-Id: I9a2b453c8c6e88c47812c652d99e4b4a9c7524a7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | fix build with various QT_NO_* definesNick Shaforostoff2016-08-261-0/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* | | darwin: Add Foundation conversion functions for QRect/QRectFTor Arne Vestbø2016-06-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | 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>
* | QtBase: use erase and std::remove_if with QList and QVectorAnton Kudryavtsev2016-04-081-8/+7
| | | | | | | | | | | | | | ... instead of using removeAt in a loop, with quadratic complexity. Change-Id: I38b49e56b12c396db9fc0f1b75d8fb43c503a7f6 Reviewed-by: Marc Mutz <marc.mutz@kdab.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.6' into devLiang Qi2015-12-181-0/+17
|\| | | | | | | | | | | | | | | | | | | | | | | 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: 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: refactor removeMnemonics(const QString &) to QPlatformThemeRichard Moe Gustavsen2015-11-041-36/+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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-2/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: filter first responder actions from edit menuRichard Moe Gustavsen2015-09-011-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+5
| | | | | | | | | | Change-Id: I4c99516fb98ce0da84b8690cc4c1fd71c0db9dca 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: enable changing menu items in QIOSMenu while it's showingRichard Moe Gustavsen2015-04-041-18/+50
| | | | | | | | | | | | | | | | | | | If the menu items change while a menu is showing, the current implementation would crash. The current code tried to take this scenario into account by using a copy of the item list inside the native menus, but failed since the list contained pointers to menu items. And those items would be deleted in a higher layer when removed from the owning QMenu, even if the native menu was visible. One could argue that the list of items should not change while the menu is visible, but from testing, other platforms handle this scenario gracefully. So this patch will ensure we do the same on iOS. Task-number: QTBUG-44275 Change-Id: I5508e1d6d47039a9aa948c246b33479bd6801868 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* iOS: Base size of menu picker toolbar on the picker size itselfTor Arne Vestbø2015-03-191-1/+2
| | | | | | | This fixes the tiny font in the UIToolbar above the UIPickerView. Change-Id: Idc6681cd5b527c15cf5331d04ff3785304146b56 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* iOS: stop listening for keyboard visibility after QIOSMenu::dismiss()Richard Moe Gustavsen2015-03-161-3/+3
| | | | | | | | | | | | | | | | We used to stop listening for keyboard visibility when quipickerview was deallocated. The problem with that approach is that we don't have a guarantee for when dealloc gets called. So what can happen is that we get a call from Qt to dismiss the menu. That causes us to close the keyboard, which will trigger the notification, which will call dismiss recursively. This will hit our assert checking if we have a valid picker view. This patch will unsubscribe to the notification explicitly upon a call to dismiss, to avoid recursive dismiss calls. Change-Id: If1efa3438037e00a02bc186fdcb6c0b3d3d595e4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* qiosmenu: Move "Done" button to the rightKai Uwe Broulik2015-02-251-4/+4
| | | | | | | The "Done" action is traditionally on the right. Change-Id: I2497b878b552a9bcf69827a0ab85f1931067a023 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: close menu when keyboard hidesRichard Moe Gustavsen2014-11-131-0/+18
| | | | | | | | | | | | | | | | If the menu is closed from the keyboard gesture, and the focus object doesn't change, the menu will still be in a visible state, even if the keyboard is hidden. This patch will ensure that this can not be the case by listening for keyboardWillHideNotification. Since we have no guarantee for when the destructor runs, we apply a pessimistic approach and ensure we stop listen when the menu gets closed. Task-number: QTBUG-42523 Change-Id: If734ea32d1823b978c9c1c67ebcc5b6c3c5c338c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: let focusobject be ImEnabled when a menu is attachedRichard Moe Gustavsen2014-11-131-2/+3
| | | | | | | | | Since the picker menu uses IM to set an alternative input view, we also need to specify that we IM is enabled. Task-number: QTBUG-42523 Change-Id: Ia559fbc0ca7e6a1a4499d5eb179baa2d915ecb17 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: ignore sender of actions for edit menuRichard Moe Gustavsen2014-10-191-1/+2
| | | | | | | | | The reason is that the sender is sometimes 'NULL', so we cannot rely on it. But the current test with our prefix should suffice. Change-Id: Ie58bf062cbade08feda622bda753d63e1d811a8d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't show popup on call to setVisibleRichard Moe Gustavsen2014-09-251-69/+47
| | | | | | | | | | | | It turns out that setting visibility means whether or not the menu should appear visible in a parent menu, and not to actually show or hide the popup. This means that the only way to show a popup is to call showPopup, which also makes it simpler since we then always get a parent window as argument that we can activate and get a focus object from. Change-Id: Ie3866b5664294f9aa4d694fa422e8116e9c75ced Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add support for submenusRichard Moe Gustavsen2014-09-251-10/+29
| | | | | Change-Id: I3816f2518125ad9c013ab578853295bf2c6bd02e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't show separator in native menusRichard Moe Gustavsen2014-09-251-1/+7
| | | | | | | | There might be menu types later that should show them, but for now we just hide them. Change-Id: Iac31e3204d8dcfd5beb5a2d5a372478ca811776c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Implement support for native menusRichard Moe Gustavsen2014-09-231-0/+525
Change-Id: I2c7278697499aa046ac7b1240b7bc713ad1fc709 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>