summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-29 16:19:13 (GMT)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-29 16:19:13 (GMT)
commit073b7ce298b0e079f310ec22dee44a9fc0af9ee6 (patch)
treefcce4bc7aeb3e96fc8a4f12d47dd9e267835f5f2 /tests/auto
parent21958b48caca3423320f3e5e0e83096ca46b4d40 (diff)
downloadQt-073b7ce298b0e079f310ec22dee44a9fc0af9ee6.zip
Qt-073b7ce298b0e079f310ec22dee44a9fc0af9ee6.tar.gz
Qt-073b7ce298b0e079f310ec22dee44a9fc0af9ee6.tar.bz2
Stabilize tst_QWidget::render_systemClip2 and remove wrong ifdef
We only want to dump images *if* RENDER_DEBUG is defined.
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 72ffcc3..dee48a3 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -6956,7 +6956,7 @@ void tst_QWidget::render_systemClip2()
// Render entire widget directly onto device.
widget.render(&image);
-#ifndef RENDER_DEBUG
+#ifdef RENDER_DEBUG
image.save("systemclip_with_device.png");
#endif
// All pixels within the system clip should now be
@@ -6972,17 +6972,17 @@ void tst_QWidget::render_systemClip2()
// Refill image with red.
image.fill(QColor(Qt::red).rgb());
+ paintEngine->setSystemClip(systemClip);
// Do the same with an untransformed painter.
QPainter painter(&image);
//Make sure we're using the same paint engine and has the right clip set.
- paintEngine->setSystemClip(systemClip);
QCOMPARE(painter.paintEngine(), paintEngine);
QCOMPARE(paintEngine->systemClip(), systemClip);
widget.render(&painter);
-#ifndef RENDER_DEBUG
+#ifdef RENDER_DEBUG
image.save("systemclip_with_untransformed_painter.png");
#endif
// All pixels within the system clip should now be