diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-08 12:15:22 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:43:38 (GMT) |
commit | c07239ac97dfce35a6b277c82ec5445e01eb2249 (patch) | |
tree | 18cf87fdf7cf151d04b97a64b45a7d43d97ae102 /tests/auto | |
parent | e8e1cdaea063dc3613b38315ca401ef55340fcbb (diff) | |
download | Qt-c07239ac97dfce35a6b277c82ec5445e01eb2249.zip Qt-c07239ac97dfce35a6b277c82ec5445e01eb2249.tar.gz Qt-c07239ac97dfce35a6b277c82ec5445e01eb2249.tar.bz2 |
Add another auto-test ensuring updates outside the brect are discared.
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 7a789c5..35a7bb9 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6487,6 +6487,14 @@ void tst_QGraphicsItem::update() const QRegion expectedRegion = itemDeviceBoundingRect.adjusted(-2, -2, 2, 2); // The entire item's bounding rect (adjusted for antialiasing) should have been painted. QCOMPARE(view.paintedRegion, expectedRegion); + + // Make sure update requests outside the bounding rect are discarded. + view.reset(); + item->repaints = 0; + item->update(-15, -15, 5, 5); // Item's brect: (-10, -10, 20, 20) + qApp->processEvents(); + QCOMPARE(item->repaints, 0); + QCOMPARE(view.repaints, 0); } void tst_QGraphicsItem::setTransformProperties_data() |