summaryrefslogtreecommitdiff
path: root/src/controls/Private/EditMenu_base.qml
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-02-041-12/+15
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Menus: Clean popup hide and destroy logicGabriel de Dietrich2015-10-011-2/+1
| | | | | | | | | | | | | | | | | | | When a menu popup gets closed it usually needs to be destroyed right away since we don't recycle its contents. There is an exception, however, and it's when he user triggers a menu item. In this case, we need to proceed in three steps. First, we hide the menu popup, then we emit the triggered signal, and when that one returns, the menu contents can be disposed. If we did all in a single step, we may end up with a crash since we don't support deleting a QtQuick item while it's running a signal handler. Delayed deletions don't work either in the case when the triggered handler ends up running the event loop. Task-number: QTBUG-45182 Task-number: QTBUG-47682 Task-number: QTBUG-48382 Change-Id: Ic39717e09f38df602f641250cd81cf4931863db6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-2/+4
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenupopupwindow_p.h Change-Id: Ic935bb56f5df70645eea30c890759f5980d68fe4
| * Menu: Separate dismiss and destroy actionsGabriel de Dietrich2015-03-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids issues when the action is triggered from a Menu and the slot ends up processing pending events, effectively deleting an object while one of its QML signal handlers is being executed. The reason being that we used to call deleteLater() on the menu popup window while still in the mouse event handler. Now, we do the same thing in three separate steps. 1. Close/dismiss the menu popups, 2. trigger the action, and 3. delete the popups. This keeps the menu popups and their contents alive until we return from the action triggered handler. We also need to take care of manually destroying any popup we may create. Finally, the menu content creation in Menu.qml had to be tweaked since we shouldn't rely on the popup visibility anymore. Task-number: QTBUG-45182 Change-Id: I9f1155bbf74dd3353c6c4066a24abf1cd2c3a283 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2015-02-111-29/+26
| | | | | | | | | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-02-031-3/+3
|\ \ | |/ | | | | Change-Id: I8dbf36b760f72a60b745197367b812185ead8133
| * Add qsTr() to text: in EditMenu_base.qmlAlbert Astals Cid2015-01-211-3/+3
| | | | | | | | | | Change-Id: I70d5987bacbad483ebaf03fefc6d47d3661a95ba Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add Undo, Redo, Delete, Clear and Select All actions to EditMenuKai Uwe Broulik2015-01-241-0/+61
|/ | | | | | | | | These items are present in their QtWidgets counterparts. Upstreamed from KDE's KQuickControls Change-Id: If9c6a8db676ee2c94927cbe9a41691d8b2072e07 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix TextField & TextArea mouse cursor shapeJ-P Nurmi2014-10-171-4/+2
| | | | | | | | | | Mouse cursor shape is specified by an internal MouseArea inside editor. Edit menu was placing another MouseArea on top, so the cursor shape was lost. This change makes EditMenu re-use the same MouseArea. Task-number: QTBUG-41955 Change-Id: I71e38bb42ea20f63b3e15c4c2cc7282b64b10d62 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* qquickmenu: add support for providing a target rect to __popup()Richard Moe Gustavsen2014-09-301-1/+1
| | | | | | | | | | | | | | | | | Using a target rect as menu location instead of a position has been supported in QPlatformMenu for a while. The reason for specifying a rect instead of a position is that then the OS can decide if the popup should be placed above or below the target rect so that it fits inside the screen. A typical example is when showing an edit menu around a text selection. If the selection (target rectangle) is far up on the screen, the popup (with arrow) will be placed below the selection instead of above, which is the normal. Change-Id: Ie6cd6a92f1d9ef480c1e455960021c7f18f86569 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* EditMenu: let menu property be a component to lazy load itRichard Moe Gustavsen2014-09-241-28/+35
| | | | | | | | | Since all input fields have a menu assigned to it by default (which in most cases never will be shown), it should be an optimization to await creating it until needed. Change-Id: I5777bbdae42103981e9b2f5ddfdfd763acea07ae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* EditMenu: add base implementation for desktopRichard Moe Gustavsen2014-09-231-0/+106
This will add a default edit menu for TextArea, TextField Combobox and Spinbox. Change-Id: Ib310d20e9f8f8c17750d12cb181577838d600bd6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>