diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-01 14:37:29 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-07-03 07:39:14 +0200 |
commit | 3fb31819fd4a209873ef671494cba8bd95dae73a (patch) | |
tree | a61b064804d5b2d7010b83cb17f31983885e8a38 /src/plugins/platforms/windows/qwindowsmousehandler.h | |
parent | 39d99c714bb87bd39e92d85fb1f46c52eb9f8d33 (diff) |
Windows QPA: Refactor touch device creation
There was duplicated code in QWindowsMouseHandler::ensureTouchDevice() and
QWindowsPointerHandler::ensureTouchDevice() which caused deprecation
warnings since the setters of QInputDevice were deprecated.
Join the 2 functions into a single creation function and add simple getters
and setters.
Fix deprecation warnings:
qwindowscontext.cpp:357:108: warning: 'void
QPointingDevice::setCapabilities(QInputDevice::Capabilities)' is deprecated: Use the constructor
qwindowsmousehandler.cpp:132:97: warning: 'void QPointingDevice::setType(QInputDevice::DeviceType)' is deprecated: Use the constructor
qwindowsmousehandler.cpp:136:41: warning: 'void QPointingDevice::setCapabilities(QInputDevice::Capabilities)' is deprecated: Use the constructor
qwindowsmousehandler.cpp:137:49: warning: 'void QPointingDevice::setMaximumTouchPoints(int)' is deprecated: Use the constructor
Change-Id: Iab5385e84d600e45b60f38225175f25ef043c3eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsmousehandler.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsmousehandler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.h b/src/plugins/platforms/windows/qwindowsmousehandler.h index 764733e3ad..0b7f26f6c6 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.h +++ b/src/plugins/platforms/windows/qwindowsmousehandler.h @@ -59,7 +59,7 @@ public: QWindowsMouseHandler(); QPointingDevice *touchDevice() const { return m_touchDevice; } - QPointingDevice *ensureTouchDevice(); + void setTouchDevice(QPointingDevice *d) { m_touchDevice = d; } bool translateMouseEvent(QWindow *widget, HWND hwnd, QtWindows::WindowsEventType t, MSG msg, |