From 23bed9f8203bb6d475622c02ea9a96efdea78108 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 1 Jun 2016 11:07:22 +0200 Subject: Remove tst_QWidget::immediateRepaintAfterShow(). It tested whether a paint event was received when calling QWidget::repaint() right after QWidget::show() without waiting for the window to be exposed. This caused a QEvent::UpdateRequest to be sent, which ended up in QWidgetBackingStore::sync() which returns after checking QWidgetBackingStore::discardSyncRequest(), since Qt::WA_Mapped is not set on the non-exposed widget. The test passed on Windows since it contains one call to QCoreApplication::processEvents() which causes the the initial WM_PAINT message to be processed in QWindowsWindow::handleWmPaint() which calls QWindowSystemInterface::flushWindowSystemEvents() and causes Qt::WA_Mapped to be set. This seems counter to the intention of the test. Remove the test since it won't pass anymore in Qt 5 unless Qt::WA_Mapped is set. Task-number: QTBUG-26424 Task-number: QTBUG-38327 Task-number: QTBUG-39842 Change-Id: Iede026d52825dcf1f2e9014a316d26d260309214 Reviewed-by: Joerg Bornemann --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp') diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 10d32472be..b7c152603c 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -378,7 +378,6 @@ private slots: void setMaskInResizeEvent(); void moveInResizeEvent(); - void immediateRepaintAfterShow(); void immediateRepaintAfterInvalidateBuffer(); void effectiveWinId(); @@ -8145,25 +8144,6 @@ void tst_QWidget::moveInResizeEvent() QTRY_COMPARE(testWidget.geometry(), expectedGeometry); } -void tst_QWidget::immediateRepaintAfterShow() -{ - if (m_platform == QStringLiteral("xcb")) - QSKIP("QTBUG-26424"); - if (m_platform != QStringLiteral("xcb") && m_platform != QStringLiteral("windows")) - QSKIP("We don't support immediate repaint right after show on other platforms."); - - UpdateWidget widget; - centerOnScreen(&widget); - widget.show(); - qApp->processEvents(); - // On X11 in particular, we are now waiting for a MapNotify event before - // syncing the backing store. However, if someone request a repaint() - // we must repaint immediately regardless of the current state. - widget.numPaintEvents = 0; - widget.repaint(); - QCOMPARE(widget.numPaintEvents, 1); -} - void tst_QWidget::immediateRepaintAfterInvalidateBuffer() { if (m_platform != QStringLiteral("xcb") && m_platform != QStringLiteral("windows")) -- cgit v1.2.3