diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-07-01 15:09:17 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-07-01 15:13:17 (GMT) |
commit | f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a (patch) | |
tree | 9118c40df004fdd4cd6acdfd582e25e86ea8f9c2 /tests/auto/qgraphicsitem | |
parent | 145e17f6cc405dd935451f0151b1a8a451c78f71 (diff) | |
download | Qt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.zip Qt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.tar.gz Qt-f4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a.tar.bz2 |
Fix a regression with extended style option items.
We basically passed an unitialized transform to construct the
styleoptions for items that use the useExtendedStyleOption flag.
We had an auto-test to cover that but for some reason view.show() was
removed by me so the auto-test did nothing. oops.
Reviewed-by:bnilsen
Diffstat (limited to 'tests/auto/qgraphicsitem')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 7552f18..3f7a50b 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6837,9 +6837,11 @@ public: //Doesn't use the extended style option so the exposed rect is the boundingRect if (!(flags() & QGraphicsItem::ItemUsesExtendedStyleOption)) { QCOMPARE(option->exposedRect, boundingRect()); + QCOMPARE(option->matrix, QMatrix()); } else { QVERIFY(option->exposedRect != QRect()); QVERIFY(option->exposedRect != boundingRect()); + QCOMPARE(option->matrix, sceneTransform().toAffine()); } } QGraphicsRectItem::paint(painter, option, widget); @@ -6861,6 +6863,8 @@ void tst_QGraphicsItem::itemUsesExtendedStyleOption() scene.addItem(rect); rect->setPos(200, 200); QGraphicsView view(&scene); + rect->startTrack = false; + view.show(); QTest::qWait(500); rect->startTrack = true; rect->update(10, 10, 10, 10); |