diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 3 | ||||
-rw-r--r-- | src/quick/items/qquickevents.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickflickable.cpp | 5 | ||||
-rw-r--r-- | src/quick/items/qquickmousearea.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp index 5b07220c29..1e949615c2 100644 --- a/src/qmltest/quicktestevent.cpp +++ b/src/qmltest/quicktestevent.cpp @@ -241,7 +241,8 @@ namespace QtQuickTest QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask); stateKey &= static_cast<unsigned int>(Qt::KeyboardModifierMask); - QWheelEvent we(pos, window->mapToGlobal(pos), QPoint(0, 0), QPoint(xDelta, yDelta), 0, Qt::Vertical, buttons, stateKey); + QWheelEvent we(pos, window->mapToGlobal(pos), QPoint(0, 0), QPoint(xDelta, yDelta), buttons, + stateKey, Qt::NoScrollPhase, false); QSpontaneKeyEvent::setSpontaneous(&we); // hmmmm if (!qApp->notify(window, &we)) diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 8303c3fed1..161ef17e1f 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -1448,7 +1448,7 @@ QQuickPointerEvent *QQuickPointerScrollEvent::reset(QEvent *event) m_synthSource = ev->source(); m_inverted = ev->inverted(); - m_point->reset(Qt::TouchPointMoved, ev->posF(), quint64(1) << 24, ev->timestamp()); // mouse has device ID 1 + m_point->reset(Qt::TouchPointMoved, ev->position(), quint64(1) << 24, ev->timestamp()); // mouse has device ID 1 } #endif // TODO else if (event->type() == QEvent::Scroll) ... diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 7e1f54f07e..cf3cd9f48e 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -1489,7 +1489,7 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event) d->vData.velocity = 0; d->hData.velocity = 0; d->timer.start(); - d->maybeBeginDrag(currentTimestamp, event->posF()); + d->maybeBeginDrag(currentTimestamp, event->position()); break; case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse case Qt::ScrollUpdate: @@ -1571,7 +1571,8 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event) QVector2D velocity(xDelta / elapsed, yDelta / elapsed); d->lastPosTime = currentTimestamp; d->accumulatedWheelPixelDelta += QVector2D(event->pixelDelta()); - d->drag(currentTimestamp, event->type(), event->posF(), d->accumulatedWheelPixelDelta, true, !d->scrollingPhase, true, velocity); + d->drag(currentTimestamp, event->type(), event->position(), d->accumulatedWheelPixelDelta, + true, !d->scrollingPhase, true, velocity); event->accept(); } diff --git a/src/quick/items/qquickmousearea.cpp b/src/quick/items/qquickmousearea.cpp index bce7ec718b..a8f09dc8be 100644 --- a/src/quick/items/qquickmousearea.cpp +++ b/src/quick/items/qquickmousearea.cpp @@ -899,7 +899,7 @@ void QQuickMouseArea::wheelEvent(QWheelEvent *event) } QQuickWheelEvent &we = d->quickWheelEvent; - we.reset(event->posF().x(), event->posF().y(), event->angleDelta(), event->pixelDelta(), + we.reset(event->position().x(), event->position().y(), event->angleDelta(), event->pixelDelta(), event->buttons(), event->modifiers(), event->inverted()); we.setAccepted(d->isWheelConnected()); emit wheel(&we); |