summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index fc192560b4..46d0b18990 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -57,9 +57,7 @@
Q_DECLARE_METATYPE(QPainterPath)
-#include "../../../qtest-config.h"
-
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
#include <windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
@@ -279,9 +277,6 @@ class tst_QGraphicsItem : public QObject
{
Q_OBJECT
-public slots:
- void init();
-
private slots:
void construction();
void constructionWithParent();
@@ -355,7 +350,7 @@ private slots:
void filtersChildEvents();
void filtersChildEvents2();
void ensureVisible();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
#endif
//void textControlGetterSetter();
@@ -481,13 +476,6 @@ private:
QList<QGraphicsItem *> paintedItems;
};
-void tst_QGraphicsItem::init()
-{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsItem::construction()
{
for (int i = 0; i < 7; ++i) {
@@ -4187,7 +4175,7 @@ void tst_QGraphicsItem::ensureVisible()
QTest::qWait(25);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsItem::cursor()
{
QGraphicsScene scene;
@@ -4535,7 +4523,7 @@ protected:
case QGraphicsItem::ItemSceneHasChanged:
break;
case QGraphicsItem::ItemCursorChange:
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
oldValues << cursor();
#endif
break;
@@ -5098,10 +5086,6 @@ public:
void tst_QGraphicsItem::paint()
{
-#ifdef Q_OS_MACX
- if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_7)
- QSKIP("QTBUG-31454 - Unstable auto-test");
-#endif
QGraphicsScene scene;
PaintTester paintTester;
@@ -6586,12 +6570,6 @@ public:
void tst_QGraphicsItem::ensureUpdateOnTextItem()
{
-#ifdef Q_OS_MAC
- if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_7) {
- QSKIP("This test is unstable on 10.7 in CI");
- }
-#endif
-
QGraphicsScene scene;
QGraphicsView view(&scene);
view.show();
@@ -11039,9 +11017,7 @@ void tst_QGraphicsItem::touchEventPropagation()
touchPoints << tp;
sendMousePress(&scene, tp.scenePos());
- QTouchDevice *device = new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
+ QTouchDevice *device = QTest::createTouchDevice();
QTouchEvent touchBegin(QEvent::TouchBegin, device, Qt::NoModifier, Qt::TouchPointPressed, touchPoints);
qApp->sendEvent(&scene, &touchBegin);