summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface
diff options
context:
space:
mode:
authorArmin Berres <armin.berres@basyskom.de>2011-03-16 07:23:57 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-03-16 07:23:57 (GMT)
commitf673f4c8273bcdde76b36cb58cb7b5e46a87f1ac (patch)
tree913e5598a782d0f22cc4752a789d0f43bb3caa65 /tests/auto/qwindowsurface
parent81ce61c9459c85f53486e668b532fe43a4d40ff0 (diff)
downloadQt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.zip
Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.gz
Qt-f673f4c8273bcdde76b36cb58cb7b5e46a87f1ac.tar.bz2
Make getters for staticContentsSupport and partialUpdateSupport virtual
When QRuntimeGraphicsSystem is asked for its support for static contents of partial updates it should return the value for the currently running wrapped graphicssystem. As the getters have not been virtual so far this could not be implemented. Additionally the setters have been removed as these values are not supposed to be set from the outside. Only the graphicssystems itself knows what it supports. If the default values should be changed the methods should be overwritten. Merge-request: 1136 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/qwindowsurface')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index b309917..4e3435e 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -82,8 +82,6 @@ public:
/* nothing */
}
- using QWindowSurface::setStaticContentsSupport;
- using QWindowSurface::setPartialUpdateSupport;
private:
QImage image;
};
@@ -283,51 +281,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