summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index 1f5563c6b7..334406272e 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -41,13 +41,13 @@
#include <QtTest/QtTest>
-#include <QtGui/qdesktopwidget.h>
-#include <QtGui/qgraphicseffect.h>
-#include <QtGui/qgraphicsview.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsitem.h>
-#include <QtGui/qgraphicswidget.h>
-#include <QtGui/qstyleoption.h>
+#include <QtWidgets/qdesktopwidget.h>
+#include <QtWidgets/qgraphicseffect.h>
+#include <QtWidgets/qgraphicsview.h>
+#include <QtWidgets/qgraphicsscene.h>
+#include <QtWidgets/qgraphicsitem.h>
+#include <QtWidgets/qgraphicswidget.h>
+#include <QtWidgets/qstyleoption.h>
#include "../../shared/util.h"
#include <private/qgraphicseffect_p.h>
@@ -533,8 +533,8 @@ public:
void draw(QPainter *painter)
{
- QVERIFY(sourcePixmap(Qt::LogicalCoordinates).pixmapData() == pixmap.pixmapData());
- QVERIFY((painter->worldTransform().type() <= QTransform::TxTranslate) == (sourcePixmap(Qt::DeviceCoordinates).pixmapData() == pixmap.pixmapData()));
+ QVERIFY(sourcePixmap(Qt::LogicalCoordinates).handle() == pixmap.handle());
+ QVERIFY((painter->worldTransform().type() <= QTransform::TxTranslate) == (sourcePixmap(Qt::DeviceCoordinates).handle() == pixmap.handle()));
++repaints;
}
@@ -688,18 +688,18 @@ void tst_QGraphicsEffect::childrenVisibilityShouldInvalidateCache()
view.show();
QApplication::setActiveWindow(&view);
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(parent.nbPaint, 1);
+ QTRY_VERIFY(parent.nbPaint >= 1);
//we set an effect on the parent
parent.setGraphicsEffect(new QGraphicsDropShadowEffect(&parent));
//flush the events
QApplication::processEvents();
//new effect applied->repaint
- QCOMPARE(parent.nbPaint, 2);
+ QVERIFY(parent.nbPaint >= 2);
child.setVisible(true);
//flush the events
QApplication::processEvents();
//a new child appears we need to redraw the effect.
- QCOMPARE(parent.nbPaint, 3);
+ QVERIFY(parent.nbPaint >= 3);
}
void tst_QGraphicsEffect::prepareGeometryChangeInvalidateCache()
@@ -716,7 +716,7 @@ void tst_QGraphicsEffect::prepareGeometryChangeInvalidateCache()
else
view.show();
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(item->nbPaint, 1);
+ QTRY_VERIFY(item->nbPaint >= 1);
item->nbPaint = 0;
item->setGraphicsEffect(new QGraphicsDropShadowEffect);
@@ -747,7 +747,7 @@ void tst_QGraphicsEffect::itemHasNoContents()
QGraphicsView view(&scene);
view.show();
QTest::qWaitForWindowShown(&view);
- QTRY_COMPARE(child->nbPaint, 1);
+ QTRY_VERIFY(child->nbPaint >= 1);
CustomEffect *effect = new CustomEffect;
parent->setGraphicsEffect(effect);