From 073b7ce298b0e079f310ec22dee44a9fc0af9ee6 Mon Sep 17 00:00:00 2001 From: Bjoern Erik Nilsen Date: Wed, 29 Apr 2009 18:19:13 +0200 Subject: Stabilize tst_QWidget::render_systemClip2 and remove wrong ifdef We only want to dump images *if* RENDER_DEBUG is defined. --- tests/auto/qwidget/tst_qwidget.cpp | 6 +++--- 1 file 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 -- cgit v0.12