aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickpopup
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-04-10 17:40:07 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-09-05 14:57:22 +0000
commitd5cb26bc56a3b6f6e99c88654d4f7a65f43551ac (patch)
tree614cfe06c0cb5ae35202e7e9e57cb1170fb0eff0 /tests/auto/qquickpopup
parent65374a95a33a677740f6e6b25c424b4a4b466b3f (diff)
Menu: ensure the correct delegates are used when created via Component
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>
Diffstat (limited to 'tests/auto/qquickpopup')
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index 9230116b..6c860d6e 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -36,6 +36,7 @@
#include <QtTest/qtest.h>
#include <QtTest/qsignalspy.h>
+#include "../shared/menuutil.h"
#include "../shared/util.h"
#include "../shared/visualtestutil.h"
#include "../shared/qtest_quickcontrols.h"
@@ -858,6 +859,7 @@ void tst_QQuickPopup::grabber()
menu->open();
QTRY_COMPARE(menu->isOpened(), true);
+ waitForMenuListViewPolish(menu);
QCOMPARE(popup->isVisible(), false);
QCOMPARE(combo->isVisible(), false);
@@ -880,6 +882,7 @@ void tst_QQuickPopup::grabber()
menu->open();
QTRY_COMPARE(menu->isOpened(), true);
+ waitForMenuListViewPolish(menu);
QCOMPARE(popup->isVisible(), false);
QCOMPARE(combo->isVisible(), false);
@@ -971,6 +974,7 @@ void tst_QQuickPopup::closeOnEscapeWithNestedPopups()
QQuickPopup *optionsMenu = window->findChild<QQuickPopup*>("optionsMenu");
QVERIFY(optionsMenu);
QTRY_VERIFY(optionsMenu->isVisible());
+ waitForMenuListViewPolish(optionsMenu);
QQuickItem *settingsMenuItem = window->findChild<QQuickItem*>("settingsMenuItem");
QVERIFY(settingsMenuItem);