@@ -20,7 +20,9 @@
20#include <QtQml/QQmlEngine>
20#include <QtQml/QQmlEngine>
21#include <QPointer>
21#include <QPointer>
22#include <private/qquickmousearea_p.h>
22#include <private/qquickmousearea_p.h>
23+#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
23−#include <private/qquickwindow_p.h>
24+ #include <private/qquickwindow_p.h>
26#include <DirectionalDragArea.h>
28#include <DirectionalDragArea.h>
@@ -815,7 +817,9 @@ void tst_DirectionalDragArea::sceneDistance()
816 QTest::touchEvent(m_view, m_device).press(0, touchPoint.toPoint());
818 QTest::touchEvent(m_view, m_device).press(0, touchPoint.toPoint());
820+#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
818 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_view);
821 QQuickWindowPrivate *wp = QQuickWindowPrivate::get(m_view);
819 for (int i = 0; i < totalMovementSteps; ++i) {
823 for (int i = 0; i < totalMovementSteps; ++i) {
820 touchPoint += touchMovement;
824 touchPoint += touchMovement;
821 passTime(movementTimeStepMs);
825 passTime(movementTimeStepMs);