diff options
Diffstat (limited to 'tests/auto/qwindowsurface/tst_qwindowsurface.cpp')
-rw-r--r-- | tests/auto/qwindowsurface/tst_qwindowsurface.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp index b309917..b209258 100644 --- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp +++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp @@ -66,7 +66,6 @@ private slots: void getSetWindowSurface(); void flushOutsidePaintEvent(); void grabWidget(); - void staticContentsAndPartialUpdateSupport(); }; class MyWindowSurface : public QWindowSurface @@ -82,8 +81,6 @@ public: /* nothing */ } - using QWindowSurface::setStaticContentsSupport; - using QWindowSurface::setPartialUpdateSupport; private: QImage image; }; @@ -283,51 +280,6 @@ void tst_QWindowSurface::grabWidget() QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white)); } -void tst_QWindowSurface::staticContentsAndPartialUpdateSupport() -{ - QWidget widget; - MyWindowSurface surface(&widget); - - // Default values. - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: YES, Static: YES - surface.setStaticContentsSupport(true); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(surface.hasStaticContentsSupport()); - - // Static contents requires support for partial updates. - // We simply ingore bad combinations and spit out a warning. - - // CONFLICT: Partial: NO, Static: YES - QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support"); - surface.setPartialUpdateSupport(false); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(surface.hasStaticContentsSupport()); - - // Partial: YES, Static: NO - surface.setStaticContentsSupport(false); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: NO, Static: NO - surface.setPartialUpdateSupport(false); - QVERIFY(!surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // CONFLICT: Partial: NO, Static: YES - QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setStaticContentsSupport: static contents support requires partial update support"); - surface.setStaticContentsSupport(true); - QVERIFY(!surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); - - // Partial: YES, Static: NO - surface.setPartialUpdateSupport(true); - QVERIFY(surface.hasPartialUpdateSupport()); - QVERIFY(!surface.hasStaticContentsSupport()); -} - QTEST_MAIN(tst_QWindowSurface) #else // Q_WS_MAC |