diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-02 15:58:11 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-16 08:08:49 +0100 |
commit | 6b82a3287f75a23823cc52b4a365f948d5c3015d (patch) | |
tree | f1ac0aaae1802e0de24e1c07ee6daf750bb17754 /tests/auto | |
parent | 75c1038311e6b585a960ee2152db9bb8e99dec8e (diff) |
Fix tst_QPushButton tests on Wayland
The tst_QPushButton::sizeHint() test was leaking top level
windows and confusing the other tests, as they may end up
becoming active.
This also re-enables tst_QPushButton::setAccel() since I
cannot reproduce the failure with that, so maybe that was
related to the leaking widgets.
Task-number: QTBUG-91418
Change-Id: I33f4a12bf67f784c5d6a06b2407d067e804d766f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp index 5469d35f19..e19264abb2 100644 --- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp @@ -337,9 +337,6 @@ void tst_QPushButton::toggled() void tst_QPushButton::setAccel() { - if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) - QSKIP("Wayland: This fails. Figure out why."); - testWidget->setText("&AccelTest"); QKeySequence seq( Qt::ALT | Qt::Key_A ); testWidget->setShortcut( seq ); @@ -576,6 +573,8 @@ void tst_QPushButton::sizeHint() button->setDefault(false); QCOMPARE(button->sizeHint(), initSizeHint); delete button; + + delete widget; } // Test 2 @@ -605,6 +604,8 @@ void tst_QPushButton::sizeHint() tabWidget->setCurrentWidget(tab1); QTRY_COMPARE(button1_2->size(), button2_2->size()); + + delete dialog; } } |