diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-18 05:08:29 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-23 03:29:34 (GMT) |
commit | d9c5d0698109c39547ee23a883b88a48a4f9f8e1 (patch) | |
tree | 9b6daed0bab9352efd2a76eb3ec4763d97df4e0e /tests/auto | |
parent | 9973d39d7eb4461c79774aee420a4996051ffbfc (diff) | |
download | Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.zip Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.tar.gz Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.tar.bz2 |
Calling setX and setY should send itemSendGeometry/ScenePositionChanged events
SetX and setY were calling setPosHelper directly therefore events for
itemSendGeometryChange and itemSendScenePositionChange were not sent
properly.
Task-number:QTBUG-9093
Reviewed-by:janarve
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index c0ad8bf..2a44af7 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -9819,6 +9819,16 @@ void tst_QGraphicsItem::scenePosChange() QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 4); QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1); QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0); + + root->setX(1); + QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 5); + QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1); + QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0); + + root->setY(1); + QCOMPARE(child1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 6); + QCOMPARE(grandChild1->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 1); + QCOMPARE(child2->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 0); } void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() |