diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-24 19:07:34 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-24 19:07:34 (GMT) |
commit | 4ef9e81c777affd140dbda97645b31b7658c7280 (patch) | |
tree | bbf07db11604e1c2541cf8abbea6465b729864f0 /tests | |
parent | 677f1b4af363845189d93bf564ab9ba97eb160e0 (diff) | |
parent | 45b205692e457bf39a245436b7db0bb03bd27bbd (diff) | |
download | Qt-4ef9e81c777affd140dbda97645b31b7658c7280.zip Qt-4ef9e81c777affd140dbda97645b31b7658c7280.tar.gz Qt-4ef9e81c777affd140dbda97645b31b7658c7280.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fixed translucent window rendering on 16 bit X11.
GV: Update issues if drawItems() is overridden and IndirectPainting is used.
More pedantry.
Fix grammar.
Doc: QFutureWatcher: specify that calls to setFuture should happen after the connections
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 59bffeb..c77f76d 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -218,6 +218,7 @@ private slots: void update(); void inputMethodSensitivity(); void inputContextReset(); + void indirectPainting(); // task specific tests below me void task172231_untransformableItems(); @@ -3799,6 +3800,31 @@ void tst_QGraphicsView::inputContextReset() QCOMPARE(inputContext.resets, 0); } +void tst_QGraphicsView::indirectPainting() +{ + class MyScene : public QGraphicsScene + { public: + MyScene() : QGraphicsScene(), drawCount(0) {} + void drawItems(QPainter *, int, QGraphicsItem **, const QStyleOptionGraphicsItem *, QWidget *) + { ++drawCount; } + int drawCount; + }; + + MyScene scene; + QGraphicsItem *item = scene.addRect(0, 0, 50, 50); + + QGraphicsView view(&scene); + view.setOptimizationFlag(QGraphicsView::IndirectPainting); + view.show(); + QTest::qWaitForWindowShown(&view); + QTest::qWait(100); + + scene.drawCount = 0; + item->setPos(20, 20); + QApplication::processEvents(); + QTRY_VERIFY(scene.drawCount > 0); +} + void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged() { QGraphicsView view; |