summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2012-10-17 15:50:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-08 15:01:52 +0100
commitd2e5c7787e82fe3157ca3100a0e465a0ed7c5685 (patch)
tree5adb0ff24e55e0487be836299e1131d6dcc96396 /tests/auto
parenta6f49a4223dcfdfb92889d26323783342e50d9a2 (diff)
Do not call QWidget::show/hideEvent twice
While handling events for Widgets and Windows in QWidgetWindow::event makes sense for other events, it causes QWidget::show/hideEvent to be called twice when handled like "the rest". Having that as one case here seems to be the cleanest solution. Removing the call to showEvent from QWidgetPrivate::show_helper (as proposed in the bug report) causes autotests to fail and thus is not a viable option. Additionally the expected result for the task221221 test for QDoubleSpinBox was reverted to the Qt4 value as Qt4 behaviour was restored. Task-number: QTBUG-27199 Task-number: QTBUG-26424 Task-number: QTBUG-22565 Change-Id: I0ac42b09b1a7618de042d27aa5dd1b3d9f30f552 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp9
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp1
3 files changed, 1 insertions, 11 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 9b03b9b8d2..7de3f8aced 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -3968,16 +3968,7 @@ void tst_QWidget::showHideEvent()
if (create && !widget.testAttribute(Qt::WA_WState_Created))
widget.create();
- if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb")) {
- QEXPECT_FAIL("window: only show", "QTBUG-26424", Continue);
- QEXPECT_FAIL("window: show/hide", "QTBUG-26424", Continue);
- QEXPECT_FAIL("window: show/hide/create", "QTBUG-26424", Continue);
- }
QCOMPARE(widget.numberOfShowEvents, expectedShowEvents);
- if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb")) {
- QEXPECT_FAIL("window: show/hide", "QTBUG-26424", Continue);
- QEXPECT_FAIL("window: show/hide/create", "QTBUG-26424", Continue);
- }
QCOMPARE(widget.numberOfHideEvents, expectedHideEvents);
}
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 12cc4e2d10..59f6ea46e9 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -1011,7 +1011,7 @@ void tst_QDoubleSpinBox::task221221()
QTest::keyClick(&spin, Qt::Key_1);
spin.show();
QVERIFY(QTest::qWaitForWindowExposed(&spin));
- QCOMPARE(spin.text(), QLatin1String("1.00"));
+ QCOMPARE(spin.text(), QLatin1String("1"));
}
void tst_QDoubleSpinBox::task255471_decimalsValidation()
diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
index 28068a808d..4e5b82a712 100644
--- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
+++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
@@ -620,7 +620,6 @@ void tst_QMenu::activeSubMenuPosition()
// to check that submenu is to the right of the main menu too.
#ifndef Q_OS_WINCE_WM
QVERIFY(sub->pos().x() > main->pos().x());
- QEXPECT_FAIL("", "QTBUG-22565", Abort);
QCOMPARE(sub->activeAction(), subAction);
#endif
}