aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickpopup
Commit message (Collapse)AuthorAgeFilesLines
* Skip tests that use graphical effects on Win 7Mitch Curtis2020-05-261-0/+8
| | | | | | | | | It's not clear why these fail, but we can live without the test on Windows 7. Fixes: QTBUG-84443 Change-Id: Ib18dfc8e12528c5086d07d6018cda93fb6e8d30c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove ignoreMessage from setOverlayParentToNullLaszlo Agocs2020-05-181-3/+0
| | | | | Change-Id: Ie678693280b374e5977a3870b395936d15023579 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Massage toolTipCrashOnClose testLaszlo Agocs2020-05-181-5/+0
| | | | | | | | | | | | | | | | | | QTest::ignoreMessage() has a feature, namely that: If the test finished and the message was not outputted, a test failure is appended to the test log. So here, if Graphical Effects is available, but not functional, ShaderEffect fails to initialize, which means the warning-to-be-skipped is never outputted. The test would pass (because the visual appearance does not matter), but the ignoreMessage() condition fails it. Adding a QSKIP is not a solution because ignoreMessage() would still do its check and fail the test! Therefore, remove the ignoreMessage() altogether. Change-Id: I3e096752dfc6894c77859e786c8a4cac01d6fc53 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Reduce dependencies on QtGraphicalEffectsMitch Curtis2020-05-131-0/+3
| | | | | | | | - Make QtGraphicalEffects optional in tests - Mention that QtGraphicalEffects is required for relevant examples Change-Id: I3ac7d06add931e0a10c3df7edc4e458ba5519c75 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Remove old QQuickPalette implementationVitaly Fanaskov2020-03-181-20/+21
| | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Regenerate projectswip/cmakeAlexandru Croitor2020-03-171-9/+5
| | | | | | Change-Id: Ifd6b2289de6465a010f5f2a32789221767b4d5be Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-173-1/+187
|\ | | | | | | Change-Id: Ieb9bcfba9651d646509afd065ce2389ef74448cc
| * Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-102-0/+56
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: Ifc09ea9f71fdba119fe8eed99f0bdcb402444f27
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-152-0/+56
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
| | | * QQuickToolTip: prevent closing after invisible tooltip createdWang Chuan2020-01-112-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all items using ToolTip attached property share the same ToolTip item, a dynamically created invisible Tooltip may unexpectedly close the current visible ToolTip. Fix this issue by checking the parent of ToolTip when trying to close it Fixes: QTBUG-78202 Change-Id: I0f6558040c6b8bf22240b0c94af912a43d525ed9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2019-11-302-1/+131
| |\| | | | | | | | | | | | | | Change-Id: Ie6039c9ad6c5b0d5077383f0a797be320cd34739
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-302-0/+129
| | |\| | | | | | | | | | | | | Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
| | | * QQuickPopup: fix focus when multiple popup exitingWang Chuan2019-11-252-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a focused Popup exited, it will try to transfer focus state to next Popup in chain or other item. However if there is an unfocused Popup exiting simultaneously, the focus state will be transferred to unfocused Popup, and this will cause loss of focus state since an unfocused Popup won't transfer its focus state to next Popup(or item) Fixes: QTBUG-79464 Change-Id: Ic06bd5a3616c8afbce449266e6fc24d2d54059d9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is being deprecated. Change-Id: I69effb678ee29d9c98bdd51dc898845869211bcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-231-1/+2
| | |\| | | | | | | | | | | | | Change-Id: I36a4d6043e00d97dc98cc9c77aa294a058574f47
| | | * Attempt to stabilise tst_qquickpopup::closeOnEscapeWithVisiblePopup()Mitch Curtis2019-11-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's flaky on openSUSE. Whenever it would fail, the activeFocusItem was always null, so check for that before doing the key press. Change-Id: Ib31d4869902b40424b3994d1d468a3eace8847f0 Fixes: QTBUG-80164 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-253-6/+196
|\| | | | | | | | | | | | | | | Change-Id: I61919fabd4a3a07ed374f2c3c1fae2d589d6e124
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-162-0/+32
| |\| | | | | | | | | | | | | | Change-Id: I647fa31fafdaea46c341c515f97b7f793ddf4b31
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-092-0/+32
| | |\| | | | | | | | | | | | | Change-Id: Ib14b8c77cefe7aaf5b11483d9a30b2ef05314598
| | | * QQuickPopup: try to grab shortcut when component completedWang Chuan2019-10-292-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If closePolicy of Popup is set to CloseOnEscape and the Popup is completed, shortcut will register to QGuiApplication to let Popup respond to Escape key. However if Popup is set to visible in creation, even if we set closePolicy to CloseOnEscape, the shortcut won't be registered. [ChangeLog][Controls][QQuickPopup] Fixed the issue that Popup doesn't respond to CloseOnEscape if the initial value of visible is true Fixes: QTBUG-79326 Change-Id: I90c6805e2b4d567a6e0d33d43a75fedcfc5416b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-091-0/+2
| |\| | | | | | | | | | | | | | Change-Id: I80f13e604dd492954c742e0ddaa7efa393776a62
| | * | Non-modal popups shouldn't set isTabFenceMarco Martin2019-11-042-0/+154
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a popup is not modal, all the application's main content can still be interacted with, therefore should still be possible to navigate it with tab. This issue is particularly evident with Drawer, also commonly used as a sidebar, in which tab navigation should always work. Fixes: QTBUG-79501 Change-Id: I0e8ad2e1abe57b9617c6316efbfe2f296c91b592 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 3358362e61ef96b3922a438d0806561285c49230)
| | * Fix tst_qquickpopup failure on Windows 7 MinGWMitch Curtis2019-10-231-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: I42b6a7050886f795e267893aa5eeaaf7a5841971 Fixes: QTBUG-79370 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Non-modal popups shouldn't set isTabFenceMarco Martin2019-10-292-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a popup is not modal, all the application's main content can still be interacted with, therefore should still be possible to navigate it with tab. This issue is particularly evident with Drawer, also commonly used as a sidebar, in which tab navigation should always work. Fixes: QTBUG-79501 Change-Id: I0e8ad2e1abe57b9617c6316efbfe2f296c91b592 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-191-6/+8
| |\| | | | | | | | | | Change-Id: I770f99d20878ddf16ab3f4b1a5422e7192622f64
| | * tst_qquickpopup: ignore ShaderEffectSource warning in debug buildsMitch Curtis2019-10-111-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was commented out but should have been #ifdef'd, and the explanation is wrong. This amends 83fbf44. Change-Id: Ibe752d63a42805361b13edc6beafcf1f3738f02f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Regenerate projects to be in syncAlexandru Croitor2019-11-151-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I3a57449c9025e22414b8337fcffdeb0f4d769af2 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-152-2/+140
|\| | | | | | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: I1e2b3f486e9ace4bc8dc0419a64848990b3a6b39
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-122-0/+136
| |\| | | | | | | | | | Change-Id: Ibdfd1048941c55bcf6abe101cad2b58a2ea9e776
| | * Fix a crash on exit when using ToolTip in a specific item hierarchyMitch Curtis2019-09-302-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickPopup connects its parent item's (MouseArea, in this case) windowChanged() signal to QQuickPopupPrivate::setWindow(). It does this so that: 1) QQuickOverlay can keep track of all of the popups that it manages. 2) Fonts, palettes and locales can be resolved. 3) If the QQuickPopup component has completed loading and the popup is visible with a valid window, start the enter transition. The problem arises only when using a very specific item hierarchy: Window { width: 640 height: 480 visible: true Item { anchors.fill: parent Item { anchors.fill: parent ColorOverlay { source: parent anchors.fill: parent } MouseArea { anchors.fill: parent hoverEnabled: true ToolTip.visible: containsMouse ToolTip.text: "ToolTip text" } } } } When the window is closed and hence begins to be destroyed, the following events occur: - QQuickWindow's destructor is called. - The window's root item (QQuickRootItem) begins destruction. - QQuickOverlay is destroyed. - QQuickWindow's destructor is done, so the QWindow and then QObject destructors are called. - The QQuickItem destructor for the outer Item is called. - The child items of the outer Item have setParentItem(nullptr) called on them, one of which being the inner Item. - The inner Item's setParentItem() function calls derefWindow(), which in turn calls derefWindow() on its children. One of those children is MouseArea. - Since the MouseArea's window is deref'd, it emits the windowChanged() signal. MouseArea is the parentItem of the popup, so its windowChanged() signal causes QQuickPopupPrivate::setWindow() to be called. - setWindow() tries to remove the popup from the old overlay, which has already been destroyed. One approach I tried involved using QQuickOverlay::itemChange() to remove all of the popups (via setWindow(nullptr), to ensure that their window pointer is nullified), since that was called much earlier than the windowChanged() signal is emitted. However, this still resulted in a heap-use-after-free in the same place when running the newly added setOverlayParentToNull() test. I also tried removing the popups in QQuickOverlay's destructor, but this resulted in another heap-use-after-free (when accessing a popup in the destructor) in tst_QQuickPopup::Universal::visible(). The remaining options were: store the window in a QPointer or return early in overlay() if the wasDeleted member of the window was true. Using QPointer seems like it would catch more issues than a single check in overlay(), so I went with that. Fixes: QTBUG-73243 Change-Id: Ieb5ce26dd76d45771d28297031ec43e27d958b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-061-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I859406dc779e59ee5d8e2980e04f8be28b1a69aa
| | | * Fix flakiness in tst_qquickdrawer testsMitch Curtis2019-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it's not ideal to add arbitrary delays to tests, it does reflect a more realistic testing environment, and more importantly, seems to fix the flakiness on OpenSUSE. (cherry picked from commit 97fc102cd079f32cc1a4f00a764ceea981699fc0) Fixes: QTBUG-77946 Change-Id: I2998611759106386091d7375b31e56523c95371f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Fix flakiness in tst_qquickdrawer testsMitch Curtis2019-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although it's not ideal to add arbitrary delays to tests, it does reflect a more realistic testing environment, and more importantly, seems to fix the flakiness on OpenSUSE. Change-Id: I0c13e5f628654aaff349c2f07be46792773a9789 Fixes: QTBUG-77946 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Remove usages of deprecated APIs of QWheelEventSona Kurazyan2019-09-021-1/+3
| |/ / | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I346ddb1e926047878ce57c88cea24d8a4689adaa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* / / Convert QtQuickControls2 testsLeander Beernaert2019-10-081-0/+51
|/ / | | | | | | | | | | | | | | Initial conversion of QtQuickControls2 tests. Change-Id: I7e09e387ec90f89cc2856c7f7f2cb810b03b7fa3 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* / QQuickComboBox: emit countChanged signal when model is updatedWang Chuan2019-07-112-0/+96
|/ | | | | | | | | [ChangeLog][QtQuick][QQuickComboBox] countChanged signal now will be emitted when a new model is set to the ComboBox Fixes: QTBUG-75972 Change-Id: Ic26718453ba06ba284ac5903fc6f55ddf3523331 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Popup: ensure that "palette" is reevaluated when enabled state changesMitch Curtis2019-02-052-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | When changing the enabled state of a Menu after component completion, the background would not change. The problem was that QQuickPopup::paletteChanged() was not being emitted when the enabled state changed, resulting in QQuickControl::palette() (which QQuickPopup::palette() forwards calls to via its popupItem) not being called. QQuickControl::palette() changes the palette's current color group to QPalette::Disabled when it is disabled, so if it's not called, the popup's colors won't change. Fix the issue by adding a virtual enabledChange() function to QQuickControl, which QQuickPopupItem can override to emit both QQuickPopup::enabledChanged() (saving a connection in the process) and QQuickPopup::paletteChanged(). This ensures that bindings to QQuickPopup::palette are re-evaluated. The patch adds a virtual instead of just emitting paletteChanged() in QQuickPopup::setEnabled(), because we also want to be notified of indirect enabled state changes, such as those coming from parent items. Change-Id: Ibdbd05f27b5a74fe731bda9d6698cbf6b8f81785 Fixes: QTBUG-73447 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QQuickPopupPositioner: fix crash on application exitMitch Curtis2019-01-142-0/+98
| | | | | | | | | | | | Don't add duplicate change listeners, since only one of them will be removed. Coincidentally, this is the same fix as d56c193e, which was reverted for unrelated reasons as part of a bulk revert in d3545dbd. Change-Id: If6fde09f884929c7928f3a1f78625559c9fcbf07 Fixes: QTBUG-72746 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Revert all Menu delegate patchesv5.12.0-rc2v5.12.0-rc1v5.12.0Mitch Curtis2018-11-151-4/+0
| | | | | | | | | | | | | | | | | | | | | This reverts the following commits: d5cb26bc56a3b6f6e99c88654d4f7a65f43551ac - Menu: ensure the correct delegates are used when created via Component d923dd467c1aeb3e195a09949b04862084002f88 - MenuBar: ensure the correct delegates are used when created via Component d56c193eb4ceb640611d66f22e1f26aae91cd7d1 - QQuickPopupPositioner: avoid adding duplicate item change listeners 567a2de8cd493aabe0055d6dbc367b39447e70dd - Stabilize tst_qquickmenubar 953fbac6131823e4fce0eb4707a854469c4c04ff - Fix Instantiator-created MenuItems disappearing 936d31179d44220571ded15840bedeccb581c83b - tst_qquickmenu: add a test for MenuItems before and after a Repeater fc1832810f6c09505d9413685ed0b2d6295bea4a - QQuickMenuBar: fix menu not opening The fix for QTBUG-67559 has caused lots of issues, with the latest being a crash right before the 5.12 release. The bug that they fix is a P2, so it's not worth the hassle. The patches might be able to be resubmitted to dev after the crash is fixed. Change-Id: Ic192c7a302176bcdb2503b636b3462b10898a2ba Fixes: QTBUG-71770 Reviewed-by: J-P Nurmi <jpnurmi@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-0214-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Menu: ensure the correct delegates are used when created via ComponentMitch Curtis2018-09-051-0/+4
| | | | | | | | | | Don't add items until we're complete, as the delegate could change in the meantime. Instead, add them to contentData and create them when we're complete. Task-number: QTBUG-67559 Change-Id: I5f42129f49de861ff5f15d0069daeda0b4e5017c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* tst_QQuickPopup: run with all stylesJ-P Nurmi2018-02-121-37/+51
| | | | | Change-Id: I0f48ef8bbf0cb7567796dc67f1030d274f684d67 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.105.10Liang Qi2018-02-091-0/+10
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia407f277cccfdd96242ebfdbe294d699e26e6b1d
| * Popup: fix restoring focus for popups that did not request focusJ-P Nurmi2018-02-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | When a popup closes, if it has active focus, it should restore focus back to where it was regardless of whether the popup originally requested focus. Even if a popup does not request focus on open, it may gain focus programmatically or when a control with click-focus is clicked, for example. Task-number: QTBUG-66113 Change-Id: I9a7c467abe781bbef390d74898d13b9a30b2695b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | remove blacklistsShawn Rutledge2017-10-221-10/+0
| | | | | | | | | | | | | | | | Task-number: QTBUG-62668 Task-number: QTBUG-62628 Task-number: QTBUG-62631 Change-Id: If3220bf00a4729573be4b85755897586105b55a2 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-09-273-1/+75
|/ | | | | | | | | | Conflicts: .gitignore tests/auto/auto.pro tests/auto/qquickmenu/tst_qquickmenu.cpp tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: I7e5a7b39d890796fd63a7b24ae19765ab41fecda
* Rename tst_popup to tst_QQuickPopupJ-P Nurmi2017-09-2716-0/+2138
Change-Id: I98f7081e94672a4454c33841934158ae82e9388f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>