From d2b1c2ef1f1fea3200d8dee5c58fe79649fd13bb Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Fri, 23 Mar 2012 18:19:27 -0700 Subject: Remove WA_PaintOutsidePaintEvent WA_PaintOutsidePaintEvent is only suggested to be used when porting Qt3 code to Qt 4 under X11 platform. and it has been broken now. Change-Id: Ie4297b2a449f1055ca10ada9efb930e6018b1efb Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- .../qgraphicswidget/tst_qgraphicswidget.cpp | 3 -- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 39 ---------------------- 2 files changed, 42 deletions(-) (limited to 'tests/auto/widgets') diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp index c6b2b49d98..3c98f8936c 100644 --- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp @@ -1384,7 +1384,6 @@ void tst_QGraphicsWidget::setAttribute_data() QTest::newRow("WA_RightToLeft") << Qt::WA_RightToLeft << true; QTest::newRow("WA_SetStyle") << Qt::WA_SetStyle << true; QTest::newRow("WA_Resized") << Qt::WA_Resized << true; - QTest::newRow("unsupported") << Qt::WA_PaintOutsidePaintEvent << false; } // void setAttribute(Qt::WidgetAttribute attribute, bool on = true) public @@ -1393,8 +1392,6 @@ void tst_QGraphicsWidget::setAttribute() QFETCH(Qt::WidgetAttribute, attribute); QFETCH(bool, supported); SubQGraphicsWidget widget; - if (attribute == Qt::WA_PaintOutsidePaintEvent) - QTest::ignoreMessage(QtWarningMsg, "QGraphicsWidget::setAttribute: unsupported attribute 13"); widget.setAttribute(attribute); QCOMPARE(widget.testAttribute(attribute), supported); } diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 975c88db05..0c769d55da 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -377,9 +377,6 @@ private slots: #endif void windowFlags(); void initialPosForDontShowOnScreenWidgets(); -#ifdef Q_WS_X11 - void paintOutsidePaintEvent(); -#endif void updateOnDestroyedSignal(); void toplevelLineEditFocus(); void inputFocus_task257832(); @@ -8711,42 +8708,6 @@ void tst_QWidget::initialPosForDontShowOnScreenWidgets() } } -#ifdef Q_WS_X11 -void tst_QWidget::paintOutsidePaintEvent() -{ - QWidget widget; - widget.resize(200, 200); - - QWidget child1(&widget); - child1.resize(100, 100); - child1.setPalette(Qt::red); - child1.setAutoFillBackground(true); - - QWidget child2(&widget); - child2.setGeometry(50, 50, 100, 100); - child2.setPalette(Qt::blue); - child2.setAutoFillBackground(true); - - widget.show(); - QTest::qWaitForWindowShown(&widget); - QTest::qWait(60); - - const QPixmap before = QPixmap::grabWindow(widget.winId()); - - // Child 1 should be clipped by child 2, so nothing should change. - child1.setAttribute(Qt::WA_PaintOutsidePaintEvent); - QPainter painter(&child1); - painter.fillRect(child1.rect(), Qt::red); - painter.end(); - XSync(QX11Info::display(), false); // Flush output buffer. - QTest::qWait(60); - - const QPixmap after = QPixmap::grabWindow(widget.winId()); - - QCOMPARE(before, after); -} -#endif - class MyEvilObject : public QObject { Q_OBJECT -- cgit v1.2.3