diff options
author | Debao Zhang <dbzhang800@gmail.com> | 2012-03-23 18:19:27 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-28 11:22:11 +0200 |
commit | d2b1c2ef1f1fea3200d8dee5c58fe79649fd13bb (patch) | |
tree | 2508abaa6383ff619546eb6afb4514c146ac92ed /tests | |
parent | 5e80eb7917c5b4d319766a3cf5122391f54c40a7 (diff) |
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 <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp | 3 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 39 |
2 files changed, 0 insertions, 42 deletions
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 |