summaryrefslogtreecommitdiff
path: root/examples/wayland
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-06-08 10:49:03 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-06-29 14:21:40 +0200
commit55d62ab4fdc8b396c1d93dad1cce1297caa3d86d (patch)
treefcda3b8ffa9ac8e71b675fc8f35109ce53624a9c /examples/wayland
parent0c72854929aacc82330365d4be00a034197abfc5 (diff)
downloadqtwayland-55d62ab4fdc8b396c1d93dad1cce1297caa3d86d.tar.gz
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 <allan.jensen@qt.io>
Diffstat (limited to 'examples/wayland')
-rw-r--r--examples/wayland/custom-extension/cpp-client/main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/wayland/custom-extension/cpp-client/main.cpp b/examples/wayland/custom-extension/cpp-client/main.cpp
index 78eac44b..e5f125f6 100644
--- a/examples/wayland/custom-extension/cpp-client/main.cpp
+++ b/examples/wayland/custom-extension/cpp-client/main.cpp
@@ -137,22 +137,22 @@ protected:
void mousePressEvent(QMouseEvent *ev) override
{
- if (rect1.contains(ev->pos()))
+ if (rect1.contains(ev->position()))
doSpin();
- else if (rect2.contains(ev->pos()))
+ else if (rect2.contains(ev->position()))
doBounce();
- else if (rect3.contains(ev->pos()))
+ else if (rect3.contains(ev->position()))
newWindow();
- else if (rect4.contains(ev->pos()))
+ else if (rect4.contains(ev->position()))
newObject();
}
private:
CustomExtension *m_extension = nullptr;
- QRect rect1;
- QRect rect2;
- QRect rect3;
- QRect rect4;
+ QRectF rect1;
+ QRectF rect2;
+ QRectF rect3;
+ QRectF rect4;
QFont m_font;
static int m_objectCount;
static int m_hue;