diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-24 15:15:18 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-08-24 15:15:18 (GMT) |
commit | 11c844de157bab85caec3ec0afe01b3f81f53bf0 (patch) | |
tree | c1ab853f576b9f765376167a2797fdacc919b951 /tests/auto/qgraphicsscene | |
parent | 1e55b0ecf415d023bbb5f291a2f26ba50c1a508b (diff) | |
parent | f3771c5d91995b2beaa73bd3e3c783b76a887b50 (diff) | |
download | Qt-11c844de157bab85caec3ec0afe01b3f81f53bf0.zip Qt-11c844de157bab85caec3ec0afe01b3f81f53bf0.tar.gz Qt-11c844de157bab85caec3ec0afe01b3f81f53bf0.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:
Fix mispositioned text with QStaticText and OpenVG graphics system
Use binarysort to find items.
QGraphicsView: Fix assert that may occurs if there are 'empty' item to draw, and changed() signal connected
Fix tst_Collections::QTBUG13079_collectionInsideCollection
Fix assignment of a Q(Explicitly)SharedDataPointer included in the data itself
Fix assignment of a container included in the container itself
Diffstat (limited to 'tests/auto/qgraphicsscene')
-rw-r--r-- | tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 903977c..7ee2a48 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -276,6 +276,7 @@ private slots: void isActive(); void siblingIndexAlwaysValid(); void removeFullyTransparentItem(); + void zeroScale(); // task specific tests below me void task139710_bspTreeCrash(); @@ -4564,5 +4565,30 @@ void tst_QGraphicsScene::taskQTBUG_7863_paintIntoCacheWithTransparentParts() } } +void tst_QGraphicsScene::zeroScale() +{ + //should not crash + QGraphicsScene scene; + scene.setSceneRect(-100, -100, 100, 100); + QGraphicsView view(&scene); + + ChangedListener cl; + connect(&scene, SIGNAL(changed(const QList<QRectF> &)), &cl, SLOT(changed(const QList<QRectF> &))); + + QGraphicsRectItem *rect1 = new QGraphicsRectItem(0, 0, 0.0000001, 0.00000001); + scene.addItem(rect1); + rect1->setRotation(82); + rect1->setScale(0.00000001); + + QApplication::processEvents(); + QCOMPARE(cl.changes.count(), 1); + QGraphicsRectItem *rect2 = new QGraphicsRectItem(-0.0000001, -0.0000001, 0.0000001, 0.0000001); + rect2->setScale(0.00000001); + scene.addItem(rect2); + rect1->setPos(20,20); + QApplication::processEvents(); + QCOMPARE(cl.changes.count(), 2); +} + QTEST_MAIN(tst_QGraphicsScene) #include "tst_qgraphicsscene.moc" |