summaryrefslogtreecommitdiff
path: root/src/controls/qquickmenupopupwindow_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Controls: append "1" to all C++ classesMitch Curtis2016-03-181-2/+2
| | | | | | | | | | This is consistent with the classes that have already had this done. It prevents clashes with Qt Quick Controls 2. These classes are not available to the user, so it doesn't affect compatibility. Change-Id: Iee73ee6bc530182732ae95993e1f4fc3766eb8e0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-161-0/+1
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/dialogs/qquickabstractfiledialog.cpp src/dialogs/qquickfiledialog.cpp Change-Id: I60aab7c7e819f82f82fc30f473b36a7a57d9a91a
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-251-0/+1
| |\ | | | | | | | | | Change-Id: I434c0d9c03200ff9ad0abc336c87ea52ea5abd67
| | * Fixed keyboard navigation in submenusFilippo Cucchetto2016-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was due to a couple of factors interacting: 1) the QQuickMenu::__popupVisible property is not in sync with the popupWindow::visible property. In fact, the QQuickMenu::__popupVisible becomes true before the PopupWindow::Show() method is called. 2) In the Menu.qml file, the menu content item is created through the user of Loader, whose active property becomes true when the QQuickMenu::__popupVisible property is true. So the result is that the MenuContentItem is created before the QQuickPopupWindow is effectively visible. 3) Given point (2), the MenuContentItem requests focus on creation (since it has focus: true). However, given (1), the QQuickPopupWindow is neither visible nor active. This patch addresses this problem by forcing activeFocus to the menuContentItem only when the popupWindow gets focus. Task-number: QTBUG-41951 Change-Id: I095700726aab4ac45a62cd37b33a069e294df30e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | | 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>
* | Suffix QQuickMenu, QQuickMenuBar & QQuickMenuItem with 1J-P Nurmi2015-12-161-5/+5
| | | | | | | | | | | | | | | | This avoids clashes between Qt Quick Controls and Qt Labs Controls. Change-Id: Ia1d367c271a3c80259d4f59be891c211ec061e01 Task-number: QTBUG-49794 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Moved menuBar function from QQuickMenuPopupWindow to QQuickmenuv5.6.0-beta1Filippo Cucchetto2015-12-071-3/+0
| | | | | | | | | | Change-Id: I6628ac2b8b07634afc1062488a12788a4e3f66c0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QQuickMenuPopupWindow: Guard m_logicalParentWindow by QPointer.Friedemann Kleint2015-11-271-1/+1
|/ | | | | | | | Fixes a crash in the menubar test. Task-number: QTBUG-49354 Change-Id: I628af74780ed9a47813a3e6fb951ad1dd8e7829a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-0/+5
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenupopupwindow_p.h Change-Id: Ic935bb56f5df70645eea30c890759f5980d68fe4
| * Menu: Separate dismiss and destroy actionsGabriel de Dietrich2015-03-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | MenuBar top level menus are not closed on click after being openedFilippo Cucchetto2015-04-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix revert partially what was done for resolving QTBUG-40391. Infact the change QTBUG-40391 caused the propagation of the events that caused the dismiss of a popupMenu. This in turn caused this bug where the click that should close menu is forwarded instead of being swallowed. However for supporting the behavior of context menu outside menubar we added some cases where the developer expect to receive the event that dismissed the popup. The use case is to reopen a dismissed popup on right click (see windows right click behavior on right clicks) Task-number: QTBUG-45315 Change-Id: If5a181b65ed9d879521ac20de577510908125169 Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Added QQuickMenu reference in QQuickMenuPopupWindowFilippo Cucchetto2015-04-131-1/+6
| | | | | | | | | | | | | | | | | | | | QQuickMenuPopupWindow has not direct reference to the QQuickMenu that created it. This is useful for navigating back from the popup to the QQuickMenu Change-Id: I6b11641ef90c423df9961277bb3e89573d1ed0e0 Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2015-02-111-15/+18
|/ | | | | | | 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.3' into 5.4J-P Nurmi2014-09-181-0/+1
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenupopupwindow.cpp Change-Id: Ibc10e7da3b3a2983c022b8973cd80cb1a7e110af
| * Fix menu popups positioning with window containersv5.3.25.3.2Laszlo Agocs2014-09-101-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-40883 Change-Id: I5c46c049b5890259d65f325adb59e15ebf29f84a Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | OS X: fix positioning of non-native menu popupsJ-P Nurmi2014-07-291-3/+3
|/ | | | | Change-Id: Iafc7f3a1a41093628e3cba8dd2a7781c2b82b021 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use the correct parent window for menu popupsLaszlo Agocs2014-07-011-1/+1
| | | | | | | | | The previous fix applied only to the non-platform menu case and was broken on OS X at least, when having a combobox in a QQuickWidget. Task-number: QTBUG-39908 Change-Id: I5dde103c2fe33d52a312cc80b36b47b13e72a188 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Menu: Extract QQuickMenuPopupWindow core popup behaviorGabriel de Dietrich2013-10-181-31/+5
| | | | | | | ... and put it in QQuickPopupWindow. Change-Id: I6920f5c13904483310faae990c7199db9f1c4708 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* ComboBox: Make popup scrollableGabriel de Dietrich2013-09-191-0/+1
| | | | | | | | | | | | | | | | We factor out part the menu item container logic from Menu into ColumnMenuContent, which takes care of scrolling and mouse hovering, and selection. This makes possible to extend the menu items layout. The pop-over and pull-down look is specified by the menu style component by overriding the ScrollView style. The popup's maximum height is also specified by the menu style. The gallery example can finally use a font families combo box. Task-number: QTBUG-31568 Change-Id: I34a7278f476471c0eb51ef51dde3dd83e13002fe Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge branch 'stable' into devGabriel de Dietrich2013-09-181-0/+3
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickaction.cpp Change-Id: I85255ba5c27c0d8ea023d0867e5963d43f8f1ddb
| * Menu: Fix keyboard navigation on WindowsGabriel de Dietrich2013-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows QPA plugin doesn't trigger activated window events for popups, resulting on the popup window not being the application focus window, and therefore, the popup window's content item not getting focus. This results in key pressed events not being sent to the menu item. We workaround this by emitting the window activated event ourselves right after the popup window is exposed. Task-number: QTBUG-33175 Change-Id: I77d1eb33b71af2232a6be6d0f7c6b480bffc10d4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Menus: add RTL supportJ-P Nurmi2013-08-131-0/+1
|/ | | | | | Change-Id: I60f997e545076feb5b72fb9eb4a03b050db5f511 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Rename QtMenuXxx to QQuickMenuXxxJ-P Nurmi2013-04-151-0/+97
Change-Id: I89aa205686f0bdf2b267ad17a8ae0470c2f4751f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>