summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-07-01 17:09:17 +0200
committerAlexis Menard <alexis.menard@nokia.com>2009-07-01 17:13:17 +0200
commitf4a95e6d6e4c046ac4857cbd54f9488d3b67ce5a (patch)
tree9118c40df004fdd4cd6acdfd582e25e86ea8f9c2 /tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
parent145e17f6cc405dd935451f0151b1a8a451c78f71 (diff)
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/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 7552f18b46..3f7a50b86a 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);