aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/focus/tst_focus.cpp8
-rw-r--r--tests/auto/qquickdrawer/tst_qquickdrawer.cpp4
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp6
-rw-r--r--tests/auto/revisions/tst_revisions.cpp4
-rw-r--r--tests/auto/sanity/tst_sanity.cpp2
5 files changed, 15 insertions, 9 deletions
diff --git a/tests/auto/focus/tst_focus.cpp b/tests/auto/focus/tst_focus.cpp
index 958b996b..8a1b36ad 100644
--- a/tests/auto/focus/tst_focus.cpp
+++ b/tests/auto/focus/tst_focus.cpp
@@ -232,7 +232,9 @@ void tst_focus::policy()
QVERIFY(!control->hasActiveFocus());
// Qt::WheelFocus
- QWheelEvent wheelEvent(QPoint(control->width() / 2, control->height() / 2), 10, Qt::NoButton, Qt::NoModifier);
+ QWheelEvent wheelEvent(QPointF(control->width() / 2, control->height() / 2), QPointF(),
+ QPoint(), QPoint(0, 10), Qt::NoButton, Qt::NoModifier,
+ Qt::NoScrollPhase, false);
QGuiApplication::sendEvent(control, &wheelEvent);
QVERIFY(!control->hasActiveFocus());
QVERIFY(!control->hasVisualFocus());
@@ -403,7 +405,9 @@ void tst_focus::scope()
QVERIFY(control->hasActiveFocus());
// Qt::WheelFocus
- QWheelEvent wheelEvent(QPoint(control->width() / 2, control->height() / 2), 10, Qt::NoButton, Qt::NoModifier);
+ QWheelEvent wheelEvent(QPointF(control->width() / 2, control->height() / 2), QPointF(),
+ QPoint(), QPoint(0, 10), Qt::NoButton, Qt::NoModifier,
+ Qt::NoScrollPhase, false);
QGuiApplication::sendEvent(control, &wheelEvent);
QVERIFY(!child->hasActiveFocus());
QVERIFY(control->hasActiveFocus());
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
index 4cf0dabe..7644cacf 100644
--- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
+++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
@@ -615,7 +615,9 @@ void tst_QQuickDrawer::wheel_data()
static bool sendWheelEvent(QQuickItem *item, const QPoint &localPos, int degrees)
{
QQuickWindow *window = item->window();
- QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos), QPoint(0, 0), QPoint(0, 8 * degrees), 0, Qt::Vertical, Qt::NoButton, 0);
+ QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos), QPoint(0, 0),
+ QPoint(0, 8 * degrees), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase,
+ false);
QSpontaneKeyEvent::setSpontaneous(&wheelEvent);
return qGuiApp->notify(window, &wheelEvent);
}
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index 0b7d14bd..d96436de 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -795,9 +795,9 @@ void tst_QQuickPopup::wheel_data()
static bool sendWheelEvent(QQuickItem *item, const QPoint &localPos, int degrees)
{
QQuickWindow *window = item->window();
- QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos),
- QPoint(0, 0), QPoint(0, 8 * degrees),
- 0, Qt::Vertical, Qt::NoButton, {});
+ QWheelEvent wheelEvent(localPos, item->window()->mapToGlobal(localPos), QPoint(0, 0),
+ QPoint(0, 8 * degrees), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase,
+ false);
QSpontaneKeyEvent::setSpontaneous(&wheelEvent);
return qGuiApp->notify(window, &wheelEvent);
}
diff --git a/tests/auto/revisions/tst_revisions.cpp b/tests/auto/revisions/tst_revisions.cpp
index 606cea33..82b32827 100644
--- a/tests/auto/revisions/tst_revisions.cpp
+++ b/tests/auto/revisions/tst_revisions.cpp
@@ -56,7 +56,7 @@ void tst_revisions::revisions_data()
QTest::addColumn<int>("revision");
// Qt 5.7: 2.0, Qt 5.8: 2.1, Qt 5.9: 2.2...
- for (int i = 0; i <= QT_VERSION_MINOR - 7; ++i)
+ for (int i = 0; i <= 15; ++i)
QTest::newRow(qPrintable(QString("2.%1").arg(i))) << i;
}
@@ -91,7 +91,7 @@ void tst_revisions::window_data()
QTest::newRow(qPrintable(QString("screen:2.%1").arg(i))) << i << "screen: null" << QString(":1 \"ApplicationWindow.screen\" is not available in QtQuick.Templates 2.%1").arg(i);
// Qt 5.9: 2.2, Qt 5.10: 2.3...
- for (int i = 2; i <= QT_VERSION_MINOR - 7; ++i)
+ for (int i = 2; i <= 15; ++i)
QTest::newRow(qPrintable(QString("screen:2.%1").arg(i))) << i << "screen: null" << "";
}
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index 1793ccfa..78b86f00 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -156,7 +156,7 @@ void tst_Sanity::initTestCase()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QString("import QtQuick.Templates 2.%1; Control { }").arg(QT_VERSION_MINOR - 7).toUtf8(), QUrl());
+ component.setData(QString("import QtQuick.Templates 2.%1; Control { }").arg(15).toUtf8(), QUrl());
const QStringList qmlTypeNames = QQmlMetaType::qmlTypeNames();