From d2e5c7787e82fe3157ca3100a0e465a0ed7c5685 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 17 Oct 2012 15:50:01 +0200 Subject: 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 Reviewed-by: Andy Shaw --- tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/widgets/qdoublespinbox') 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() -- cgit v1.2.3