From 2b827691dc7484afc58342c07794211c0a84afcb Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 8 Jun 2020 10:49:03 +0200 Subject: [PATCH] Replace calls to deprecated QEvent accessor functions Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qtwayland $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: If822ba409f974f737dc46ac31f6e8e92cc1603cc Reviewed-by: Allan Sandfeld Jensen --- src/plugins/platforms/wayland/qwaylandcursor.cpp | 2 +- tests/auto/wayland/client/tst_client.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 5a6ab44bc73..56caf05e2f1 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -270,7 +270,7 @@ void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window) void QWaylandCursor::pointerEvent(const QMouseEvent &event) { - mLastPos = event.globalPos(); + mLastPos = event.globalPosition().toPoint(); } QPoint QWaylandCursor::pos() const diff --git a/tests/auto/wayland/client/tst_client.cpp b/tests/auto/wayland/client/tst_client.cpp index 42e23b54ce9..ad63eca0a7d 100644 --- a/tests/auto/wayland/client/tst_client.cpp +++ b/tests/auto/wayland/client/tst_client.cpp @@ -81,7 +81,7 @@ public: void mousePressEvent(QMouseEvent *event) override { ++mousePressEventCount; - mousePressPos = event->pos(); + mousePressPos = event->position().toPoint(); } void mouseReleaseEvent(QMouseEvent *) override