diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowspointerhandler.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp index f25e6d13d8..c11be972b0 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp +++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp @@ -239,8 +239,8 @@ static QTouchDevice *createTouchDevice() QTouchDevice *QWindowsPointerHandler::ensureTouchDevice() { if (!m_touchDevice) - m_touchDevice.reset(createTouchDevice()); - return m_touchDevice.data(); + m_touchDevice = createTouchDevice(); + return m_touchDevice; } Qt::MouseButtons QWindowsPointerHandler::queryMouseButtons() @@ -400,7 +400,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd, touchPoints.append(touchPoint); } - QWindowSystemInterface::handleTouchEvent(window, m_touchDevice.data(), touchPoints, + QWindowSystemInterface::handleTouchEvent(window, m_touchDevice, touchPoints, QWindowsKeyMapper::queryKeyboardModifiers()); if (!(QWindowsIntegration::instance()->options() & QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch)) { diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.h b/src/plugins/platforms/windows/qwindowspointerhandler.h index 11bc9419d7..c4d0e0ce4a 100644 --- a/src/plugins/platforms/windows/qwindowspointerhandler.h +++ b/src/plugins/platforms/windows/qwindowspointerhandler.h @@ -59,7 +59,7 @@ public: QWindowsPointerHandler() = default; bool translatePointerEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result); bool translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result); - QTouchDevice *touchDevice() const { return m_touchDevice.data(); } + QTouchDevice *touchDevice() const { return m_touchDevice; } QTouchDevice *ensureTouchDevice(); Qt::MouseButtons queryMouseButtons(); QWindow *windowUnderMouse() const { return m_windowUnderPointer.data(); } @@ -70,7 +70,7 @@ private: bool translateTouchEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, PVOID vTouchInfo, unsigned int count); bool translatePenEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, PVOID vPenInfo); - QScopedPointer<QTouchDevice> m_touchDevice; + QTouchDevice *m_touchDevice = nullptr; QHash<int, QPointF> m_lastTouchPositions; QPointer<QWindow> m_windowUnderPointer; QPointer<QWindow> m_currentWindow; |