diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 17:55:57 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-12-09 17:55:57 (GMT) |
commit | 130e24ae66e4b394ef4c017c67c16d8210aa0bd1 (patch) | |
tree | 67bca464eda71d074aa07ca5b46c4d81f9db76c6 /tests | |
parent | 460d52bfa85318610576d1ab75eae4799865e064 (diff) | |
parent | 0c7687458c524252dae26deb32f7a3b8a38491f5 (diff) | |
download | Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.zip Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.tar.gz Qt-130e24ae66e4b394ef4c017c67c16d8210aa0bd1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Try using pure scissor clip in GL 2 engine for rotations.
Fixed DeviceCoordinateCache items when using QGraphicsScene::render().
Fixed missing text in GL 2 engine after recreating a context.
Fix compilation of qnetworkreply test with namespaces.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 23 | ||||
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 6a2f849..588c476 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -288,6 +288,7 @@ private slots: void taskQT657_paintIntoCacheWithTransparentParts(); void taskQTBUG_7863_paintIntoCacheWithTransparentParts(); void taskQT_3674_doNotCrash(); + void taskQTBUG_15977_renderWithDeviceCoordinateCache(); }; void tst_QGraphicsScene::initTestCase() @@ -4629,5 +4630,27 @@ void tst_QGraphicsScene::zeroScale() QTRY_COMPARE(cl.changes.count(), 2); } +void tst_QGraphicsScene::taskQTBUG_15977_renderWithDeviceCoordinateCache() +{ + QGraphicsScene scene; + scene.setSceneRect(0, 0, 100, 100); + QGraphicsRectItem *rect = scene.addRect(0, 0, 100, 100); + rect->setPen(Qt::NoPen); + rect->setBrush(Qt::red); + rect->setCacheMode(QGraphicsItem::DeviceCoordinateCache); + + QImage image(100, 100, QImage::Format_RGB32); + QPainter p(&image); + scene.render(&p); + p.end(); + + QImage expected(100, 100, QImage::Format_RGB32); + p.begin(&expected); + p.fillRect(expected.rect(), Qt::red); + p.end(); + + QCOMPARE(image, expected); +} + QTEST_MAIN(tst_QGraphicsScene) #include "tst_qgraphicsscene.moc" diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 9cf61f9..cff0ae9 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -336,10 +336,10 @@ private Q_SLOTS: void parentingRepliesToTheApp(); }; -QT_BEGIN_NAMESPACE - bool tst_QNetworkReply::seedCreated = false; +QT_BEGIN_NAMESPACE + namespace QTest { template<> char *toString(const QNetworkReply::NetworkError& code) |