diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquickitem/tst_qquickitem.cpp | 11 | ||||
-rw-r--r-- | tests/auto/quick/touchmouse/tst_touchmouse.cpp | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index b37bb03305..0bb913d104 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -64,7 +64,11 @@ public: , ungrabs(0) , m_active(false) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) setAcceptTouchEvents(true); +#else + setAcceptedMouseButtons(Qt::LeftButton); // not really, but we want touch events +#endif } QPointF pos() const { return m_pos; } diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index dbfe97d640..f4434d9d3f 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -46,11 +46,14 @@ class TestItem : public QQuickItem Q_OBJECT public: TestItem(QQuickItem *parent = 0) - : QQuickItem(parent), focused(false), pressCount(0), releaseCount(0) - , wheelCount(0), acceptIncomingTouchEvents(true) - , touchEventReached(false), timestamp(0) - , lastWheelEventPos(0, 0), lastWheelEventGlobalPos(0, 0) { + : QQuickItem(parent), focused(false), pressCount(0), releaseCount(0) + , wheelCount(0), acceptIncomingTouchEvents(true) + , touchEventReached(false), timestamp(0) + , lastWheelEventPos(0, 0), lastWheelEventGlobalPos(0, 0) + { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) setAcceptTouchEvents(true); +#endif } bool focused; diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp index 6f5c9a37d5..643d3dbb90 100644 --- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp +++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp @@ -74,7 +74,9 @@ public: : QQuickItem(parent), touchUngrabCount(0), acceptMouse(false), acceptTouch(false), filterTouch(false), point0(-1) { setAcceptedMouseButtons(Qt::LeftButton); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) setAcceptTouchEvents(true); +#endif } void touchEvent(QTouchEvent *event) |