summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsview
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-13 11:55:44 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-13 12:03:06 (GMT)
commitd9d76d0f56b0e2b0ce09abf39c710a1e666fa09f (patch)
treedd1a68c3a7054c06afe1807f199efbb0ca5fa05f /tests/auto/qgraphicsview
parent1f8fae877a8f4fcaec77c7d2dc1376b7ade61aee (diff)
downloadQt-d9d76d0f56b0e2b0ce09abf39c710a1e666fa09f.zip
Qt-d9d76d0f56b0e2b0ce09abf39c710a1e666fa09f.tar.gz
Qt-d9d76d0f56b0e2b0ce09abf39c710a1e666fa09f.tar.bz2
Fix graphicsview test on Cocoa.
Cocoa doesn't support regions update and always update the bounding rect (see comment in QWidgetPrivate::update_sys in qwidget_mac.cpp) Change tests that checked that we get the exact regions. Reviewed-by: MortenS
Diffstat (limited to 'tests/auto/qgraphicsview')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 8acaa72..389200b 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -2210,9 +2210,11 @@ void tst_QGraphicsView::viewportUpdateMode()
// The view gets two updates for the update scene updates.
QTRY_VERIFY(!view.lastUpdateRegions.isEmpty());
+#ifndef QT_MAC_USE_COCOA //cocoa doesn't support drawing regions
QCOMPARE(view.lastUpdateRegions.last().rects().size(), 2);
QCOMPARE(view.lastUpdateRegions.last().rects().at(0).size(), QSize(15, 15));
QCOMPARE(view.lastUpdateRegions.last().rects().at(1).size(), QSize(15, 15));
+#endif
// Set full update mode.
view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
@@ -3431,10 +3433,12 @@ void tst_QGraphicsView::exposeRegion()
// Make sure it triggers correct repaint on the view.
QTRY_COMPARE(view.lastUpdateRegions.size(), 1);
- QTRY_COMPARE(view.lastUpdateRegions.at(0), expectedExposeRegion);
+ COMPARE_REGIONS(view.lastUpdateRegions.at(0), expectedExposeRegion);
// Make sure the item didn't get any repaints.
+#ifndef QT_MAC_USE_COCOA
QCOMPARE(item->paints, 0);
+#endif
}
void tst_QGraphicsView::update_data()