aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/popup
Commit message (Collapse)AuthorAgeFilesLines
* Popups: take Window::contentOrientation into accountJ-P Nurmi2017-07-272-0/+108
| | | | | | Task-number: QTBUG-62158 Change-Id: I0bcf5b02da6a3500e4324462d5f1249a6178c9fd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix modal overlay to block multi-touchJ-P Nurmi2017-07-041-0/+34
| | | | | | Task-number: QTBUG-61698 Change-Id: I46db5e9816190ac7afd6b671198dff11089bc4f3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_popup: add closeOnEscapeWithNestedPopups()Mitch Curtis2017-05-262-0/+180
| | | | | | | | | | This test confirms that the behavior found in the gallery example (where there are several nested popups that should close when the Escape key is pressed, and a Shortcut that should also be activated by the Escape key once all popups are closed) continues to work. Change-Id: Ie848ff3505e66ded7b78777808d982c642092d61 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* tst_popup: disable touch compressionJ-P Nurmi2017-05-021-0/+7
| | | | | | | | 09b9a55 added touch event tests to tst_popup::overlay(). In order to make touch tests reliable, touch event compression must be disabled. Change-Id: I9fcda132447d9a8cf6ef80163be46aea391eff24 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't close a popup when pressed inside and released outsideJ-P Nurmi2017-04-291-0/+6
| | | | | Change-Id: Iadf58b0c98d7410e4cc9f75f4baf42adf8c521b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix Popup.CloseOnRelease for non-modal popupsJ-P Nurmi2017-04-271-16/+40
| | | | | Change-Id: I70ac251a02a7856e6770cdb9b3e5b2a2d027d133 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popups: fix non-dimming modal background leaking events throughJ-P Nurmi2017-04-261-4/+28
| | | | | | | | | | | This piece of code, which was thought unnecessary, went missing when moved from mousePressEvent() to handlePress() in 7faafa4. It is needed after all for non-dimming modal popups, because in that case we simply cannot rely on the background dimming blocking the press... Task-number: QTBUG-60405 Change-Id: I53d89133eeae4ad8531b3c1e07c3b22295d438de Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix QQuickPopup::isComponentComplete()J-P Nurmi2017-04-211-0/+23
| | | | | | | | | | | | | | | It has to default to true to ensure that a QQuickPopup instantiated in C++ is not stuck to false forever. When instantiated by the QML engine, it is set to false during the QML component initialization phase from classBegin() to componentComple(). NOTE: QQuickPopupItem's visibility has to be now set outside of QQuickPopupItem constructor, because QQuickPopupItem::itemChange() calls back to QQuickPopup::itemChange(). At that point QQuickPopupPrivate::popupItem should be set. Change-Id: I96fa4ab4b2f29344c4a0d5bce5f8c7642e9db1a6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* *.pro: osx -> macosJ-P Nurmi2017-04-201-1/+1
| | | | | Change-Id: I29b36eaa417986be24c917bc9c9b1f6441773e3d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-2412-24/+144
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPopup: ensure that the cursor is correct when overlapping itemsMitch Curtis2017-02-202-0/+94
| | | | | | | | | | When a popup is over an item that has a different cursor (such as a TextField), the cursor incorrectly took on that shape, because QQuickPopup didn’t have an explicitly set cursor. Task-number: QTBUG-58810 Change-Id: I4df6dd725cac027b2c30fe69ad81d9cd7e622c15 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Welcome to 2017J-P Nurmi2017-01-0912-12/+12
| | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-282-0/+122
|\ | | | | | | | | | | | | | | Conflicts: src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc sync.profile Change-Id: I554c40516030075142f9af1dd5c66fdca2b78b9a
| * Fix popups to close on click outsidev5.7.1J-P Nurmi2016-10-252-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | When a popup closes itself on press outside, it accepts the press event so that it doesn't propagate to other popups or the content below. We must make sure that such closing popup does not become the mouse grabber, because it doesn't make sense to route the subsequent mouse events to the popup that was just closed. Change-Id: I80c6e26a1d94aa1526a61862f00af2fd0778aa82 Task-number: QTBUG-56697 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Avoid .qmlc files being picked up by Creator's locatorMitch Curtis2016-11-111-1/+1
| | | | | | | | | | Change-Id: Ic3764ca6ba70b3b9557a6c2088698c40456a93f5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-10-032-0/+101
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/qtquickcontrols2.qdocconf src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml src/imports/controls/qtquickcontrols2plugin.cpp src/quicktemplates2/qquicktooltip.cpp src/quicktemplates2/qquicktooltip_p.h src/quicktemplates2/qquicktumbler.cpp tests/auto/controls/data/tst_spinbox.qml tests/auto/controls/data/tst_tumbler.qml tests/auto/qquickmaterialstyle/data/tst_material.qml Change-Id: I25b7473b47739043b6f768603bece30b18021318
| * Popup: don't steal focus on close from another opening popupJ-P Nurmi2016-10-022-0/+101
| | | | | | | | | | | | | | | | | | In the Gallery example, the settings dialog does not get focus (or to be exact, loses it immediately), because the closing menu incorrectly transfers focus back to the tool button that opened the menu. Change-Id: I5328d8e825de9a977619688dc4478e6592db654f Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-262-0/+91
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quickcontrols2/gallery/gallery.qrc src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc src/quicktemplates2/qquickstackview_p.cpp src/quicktemplates2/qquickstackview_p_p.h tests/auto/controls/data/tst_stackview.qml Change-Id: If451fe0e5653572d305b4de90a6d5cb878463e8d
| * Fix nested popupsJ-P Nurmi2016-09-232-0/+91
| | | | | | | | | | | | Task-number: QTBUG-56136 Change-Id: I3ed7fae09c342c2c456b94fc0cfed781d8edf6aa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-143-0/+229
|\| | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h Change-Id: Ie7b4a114ad27a4cad337c91e8ebcf696b0e845d7
| * Fix modal overlays leaking wheel events throughJ-P Nurmi2016-09-133-0/+229
| | | | | | | | | | | | Change-Id: I1a3be5ef02cf73a153cebc030313f892fbb03d9f Task-number: QTBUG-55769 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8J-P Nurmi2016-09-064-41/+282
|\| | | | | | | Change-Id: Ief98cd56abd13cfa4e30578e150207462a8243b8
| * QQuickDrawer: fix the internal transition stateJ-P Nurmi2016-09-061-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When QQuickDrawer was visible all the time, it did not emit the visibility related signals at all. Now the signals are emitted, but aboutToShow() and visibleChanged() were emitted twice when a drawer was manually dragged open. First time when the dragging begins (the drawer becomes effectively visible), and second time when the open transition begins after mouse/touch release. This change ensures that the signals won't be emitted again when the transition begins, in case they were already emitted. Change-Id: I2a175c9e86a480d5cd23e306f41f0d85e2416f75 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Fix hover event delivery with plain QQuickWindowJ-P Nurmi2016-09-053-7/+81
| | | | | | | | | | | | | | | | | | | | A plain QQuickWindow cannot provide a modal background dimming visual, but we can create a QQuickItem as a fallback to take care of blocking the hover events for modal popups. Change-Id: I3ead985c4e2e030aaf28f1ec6c8a1ae285637819 Task-number: QTBUG-54913 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Use QQuickOverlay with plain QQuickWindowJ-P Nurmi2016-09-052-27/+153
| | | | | | | | | | | | | | | | | | | | | | Get rid of the ugly and broken event filter approach that was used with QQuickWindow. Create an instance of QQuickOverlay so that the same overlay code path is used for both QQuickApplicationWindow and plain QQuickWindow. Task-number: QTBUG-55729 Change-Id: I6e26b19cd94a9580418912803f50c30b9dcaeedb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * auto tests: allow using QQuickWindow with QQuickApplicationHelperJ-P Nurmi2016-09-051-22/+22
| | | | | | | | | | | | | | | | This allows us to run the relevant popup tests for both QQuickWindow and QQuickApplicationWindow. Change-Id: I14b6435afeeb8a6cf640d8c52ad1d9e1fae070b0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-231-0/+9
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qquickmaterialstyle.cpp src/imports/controls/universal/qquickuniversalstyle.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquicktooltip.cpp tests/auto/auto.pro Change-Id: I88b347dd85278e14f7b2ca468e30648c6432b6f2
| * QQuickPopup: don't keep a reference to a destroyed parentJ-P Nurmi2016-08-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | Move the itemDestroyed() listener from QQuickPopupPositioner, which is only active while the popup is visible, to QQuickPopupPrivate instead. This way the popup gets a notification when the parent gets destroyed while the popup is hidden. Task-number: QTBUG-55347 Change-Id: Ic72206cc05996c23062e814799a030c369fc6288 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devJ-P Nurmi2016-07-223-1/+178
|\| | | | | | | Change-Id: I82c2b8d97d639e24147118a2ca6276ae70195b45
| * Fix overlay event processing order for popupsJ-P Nurmi2016-07-222-0/+45
| | | | | | | | | | | | | | It should follow the stacking order of popups. Change-Id: Id5664496c60e99bdf0aa4b2dc6a2c94dba2c756a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Don't leak hover events through modal overlaysJ-P Nurmi2016-07-221-1/+13
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: I5c1ce684cff7954f9c011e991e3924741ad44367 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Don't leak hover events through popupsJ-P Nurmi2016-07-222-0/+119
| | | | | | | | | | | | Task-number: QTBUG-53419 Change-Id: Ia3e23538bfba09454c9b473d8394814890ada150 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Popups: fix overlay visibilityJ-P Nurmi2016-07-221-1/+2
| | | | | | | | | | | | | | | | | | | | Make sure popup overlay dimmers gets destroyed when popups are closed, and thus, re-parented out of the window overlay. The window overlay item is hidden when there are no child items, so this fixes the issue that the window overlay item was left visible after closing popups. Change-Id: Id2ffe43b706ffcc5cda83abd75354ef04f893745 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Bump up all controls and templates imports to version 2.1J-P Nurmi2016-07-083-3/+3
|/ | | | | | | | | | | | Controls must import templates version 2.1 in order to "inherit" 1-revisioned properties, methods, and signals. So far, this has been done case by case, but it's less error prone and more clear to change them all. For example, if you ever see a source file pasted/linked somewhere, it's easy to identify the version it belongs to. Change-Id: I41609ec1a22bc05ac3e79f953a147ca42d9e0786 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Make Overlay.modal and modeless ComponentsJ-P Nurmi2016-05-231-6/+22
| | | | | | | | | | | | | | | | This way we can simply instantiate a visual overlay for each modal or dimming popup without having tricky problems with overlay's stacking order. It makes also sense to not instantiate the overlays for hidden popups. Coincidentally, this change also fixes a problem that the overlay turned out to be _always_ visible since a hidden overlay background was always instantiated no matter if there were open popups, or popups at all. Change-Id: Ieb64a72c827d0a005418027428378ebe04f41117 Task-number: QTBUG-53519 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't restore focus to contentItem when a focusless popup was closedMitch Curtis2016-05-193-0/+194
| | | | | | | | | For example, a ToolTip shouldn't affect focus when it closes. Task-number: QTBUG-53420 Task-number: QTBUG-53451 Change-Id: Ic945e98a2ffd86e9f9f06724b16e5f240c3f94de Reviewed-by: Liang Qi <liang.qi@qt.io>
* QQuickPopup: listen to parent item's window changesJ-P Nurmi2016-05-031-0/+26
| | | | | | | | | Emitting windowChanged() only in setParentItem() is unreliable, because the item might not yet have a window. Therefore we must listen to the parent item's windowChanged() signal. Change-Id: I237f81e0b06319516428c3c5d42352b228e753f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* import Qt.labs.controls 1.0 => QtQuick.Controls 2.0J-P Nurmi2016-04-211-1/+1
| | | | | | | | | Docs, resources, .metainfo and plugins.qmltypes will be updated in follow up commits. Change-Id: I4438c5bfb8802bff0fa15c56431cfd288f179861 Task-number: QTBUG-52549 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Popup: rename close policy flagsJ-P Nurmi2016-04-201-11/+11
| | | | | | | | | | | Even though it gets a bit long, it's much easier to remember close policy values that start with "Close". Even with auto-completion, one still has to type something for Qt Creator to know what to complete. That's where consistency (closePolicy -> CloseFoo, snapMode -> SnapBar) helps. Change-Id: Idc86322c0d1e367fad87eb1deafbf58ef6ddb04d Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-132-5/+5
| | | | | Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Change the default value of QQuickPopup::closePolicyJ-P Nurmi2016-03-211-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | When Popup::ClosePolicy was introduced, I thought that it would be better to not set OnPressOutside by default, because not all popups necessarily want to close on press outside. However, I've realized that every time I do Button { onClicked: popup.open() Popup { } } ...there's literally no interactive way to close the popup (popups don't take focus by default, so Esc doesn't work). Provided that a top-level QWidget with the Qt::Popup flag set also closes automatically on press outside, it probably makes more sense for us to follow the same pattern so that poor new users don't have to lookup the docs just to figure out how to make a popup close. :) In this case it's less troublesome to specify a different default value in those special scenarios/subclasses where closing on press outside is not desired (eg. the upcoming Popup-based Drawer). Change-Id: Iaeab4c548d63728df12232d8b65d469f0a2d80f5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* tst_popup: add missing window->requestActivate() callsJ-P Nurmi2016-03-211-0/+3
| | | | | | | | | The tests are waiting for the window to become active, but not actually requesting it to be activated. Change-Id: I9f8cd6a09b0d89bba8f9adb9b5efa5bb59d7c185 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Rename Qt Labs Controls to Qt Quick Controls 2 - build systemMitch Curtis2016-03-182-5/+5
| | | | | | | | | The imports will be done later, as we don't want to change them until the module is releasable (which requires things like selection handles, etc.). Change-Id: I2140cff7058fc3b696e92ca8c0e5e06dca9a7c9c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add QQuickPopup::popupItem()J-P Nurmi2016-01-281-2/+2
| | | | | | | | | | | | | | Even though I didn't want to expose this, because I'm still hoping we could make QQuickPopup inherit QQuickControl in the future, the fact that QQuickPopupPrivate::get(popup)->popupItem was used in so many places is a good indicator that accessing the popup item is often required when dealing with popups. In any case, this is C++ only API and not exposed to QML, so it's not that big deal... and we can always deprecate it later and make it return "this" should the item plans come true. Change-Id: I6b99a499327d838ee61eae70f8ebf8e77f00ae39 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Replace Popup::pressed|releasedOutside with close policy flagsJ-P Nurmi2016-01-282-18/+69
| | | | | Change-Id: I3e09c4e2b6cbbe39bdf9e943905664e5dc1fe954 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Popup::closePolicyJ-P Nurmi2016-01-283-0/+263
Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>