diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-26 13:35:14 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-28 12:33:00 +0000 |
commit | 32f3f85b3ba044d9eb35996eb8df84b9822b2fd7 (patch) | |
tree | cc5615b2c837729a23f067a28bc66cbf622aae30 /src/compositor/compositor_api/qwaylandquickitem.cpp | |
parent | b6703d94d833c73dbe7fd252c4b61db455f5c2f5 (diff) | |
download | qtwayland-32f3f85b3ba044d9eb35996eb8df84b9822b2fd7.tar.gz |
Remove usages of deprecated APIs of QWheelEvent
- Replaced the usages of deprecated QWheelEvent::delta() and
QWheelEvent::orientation() with QWheelEvent::angleDelta().
- Removed the tests for deprecated APIs.
Task-number: QTBUG-76491
Change-Id: I2f9a53d3236bce8ba6cee66ec1b0b933d50518aa
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandquickitem.cpp')
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickitem.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index 01b183b8..ee15a087 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -616,7 +616,11 @@ void QWaylandQuickItem::wheelEvent(QWheelEvent *event) } QWaylandSeat *seat = compositor()->seatFor(event); - seat->sendMouseWheelEvent(event->orientation(), event->delta()); + // TODO: fix this to send a single event, when diagonal scrolling is supported + if (event->angleDelta().x() != 0) + seat->sendMouseWheelEvent(Qt::Horizontal, event->angleDelta().x()); + if (event->angleDelta().y() != 0) + seat->sendMouseWheelEvent(Qt::Vertical, event->angleDelta().y()); } else { event->ignore(); } |