From 9b72900834a59e07d495fa641526583c2a554840 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 16 Jun 2020 16:43:06 +0200 Subject: Update QTabletEvent device_information manual test - stop using deprecated accessors in QTabletEvent and QMouseEvent - position() and globalPosition() provide high resolution so we don't need to display hi-res global pos separately - keep a pointer to the last-seen QPointingDevice instance rather than copying fields out of it; it will only be deleted if the platform plugin does that (usually only at exit or when it's unplugged) - show seat ID - show platform-specific device ID Change-Id: Ic34e1d1256d6956867992db831c2e66bdda7001e Reviewed-by: Friedemann Kleint --- .../manual/qtabletevent/device_information/tabletwidget.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'tests/manual/qtabletevent/device_information/tabletwidget.h') diff --git a/tests/manual/qtabletevent/device_information/tabletwidget.h b/tests/manual/qtabletevent/device_information/tabletwidget.h index d05b89a74e..b58442ccda 100644 --- a/tests/manual/qtabletevent/device_information/tabletwidget.h +++ b/tests/manual/qtabletevent/device_information/tabletwidget.h @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -51,27 +52,19 @@ protected: QString modifiersToString(Qt::KeyboardModifiers m); private: void resetAttributes() { - mDev = QInputDevice::DeviceType::Unknown; - mPointerType = QPointingDevice::PointerType::Unknown; - mCaps = {}; + mDev.clear(); mType = mXT = mYT = mZ = 0; mPress = mTangential = mRot = 0.0; mPos = mGPos = QPoint(); - mHiResGlobalPos = QPointF(); - mUnique = 0; } + QPointer mDev; int mType; - QPoint mPos, mGPos; - QPointF mHiResGlobalPos; - QInputDevice::DeviceType mDev; - QPointingDevice::PointerType mPointerType; - QPointingDevice::Capabilities mCaps; + QPointF mPos, mGPos; int mXT, mYT, mZ; Qt::MouseButton mButton; Qt::MouseButtons mButtons; Qt::KeyboardModifiers mModifiers; qreal mPress, mTangential, mRot; - qint64 mUnique; bool mMouseToo; ulong mTimestamp; int mWheelEventCount; -- cgit v1.2.3