Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.0 Beta 1
-
None
-
e011c9c3b8f6754c5478f8c1e641c761b7c77c6d
Description
Discovered this while trying to prototype a UI which requires a modifier key to be held with one hand while manipulating the touchscreen with the other. It should be possible, and we plan to support it via QML API with PointerHandlers:
https://codereview.qt-project.org/#/c/190310/
A QTouchEvent is a QInputEvent, so it has a modifiers property by inheritance; and we should not leave such properties unset when it's trivial to set them properly.
$ cd qtbase/src/plugins/platforms $ git grep handleTouchEvent android/androidjniinput.cpp: QWindowSystemInterface::handleTouchEvent(window, touchDevice, m_touchPoints); cocoa/qnsview.mm: QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, touchDevice, points); cocoa/qnsview.mm: QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, touchDevice, points); cocoa/qnsview.mm: QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, touchDevice, points); cocoa/qnsview.mm: QWindowSystemInterface::handleTouchEvent(m_platformWindow->window(), timestamp * 1000, touchDevice, points); ios/quiview.mm: QWindowSystemInterface::handleTouchEvent<QWindowSystemInterface::SynchronousDelivery>(m_qioswindow->window(), timeStamp, iosIntegration->touchDevice(), m_activeTouches.values()); mirclient/qmirclientinput.cpp: QWindowSystemInterface::handleTouchEvent(window->window(), timestamp, qnx/qqnxscreeneventhandler.cpp: handleTouchEvent(event, qnxType); qnx/qqnxscreeneventhandler.cpp:void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType) qnx/qqnxscreeneventhandler.cpp: QWindowSystemInterface::handleTouchEvent(w, m_touchDevice, pointList); qnx/qqnxscreeneventhandler.h: void handleTouchEvent(screen_event_t event, int qnxType); windows/qwindowsmousehandler.cpp: QWindowSystemInterface::handleTouchEvent(window, winrt/qwinrtscreen.cpp: QWindowSystemInterface::handleTouchEvent(targetWindow, d->touchDevice, d->touchPoints.values(), mods); xcb/qxcbconnection_xi2.cpp: QWindowSystemInterface::handleTouchEvent(platformWindow->window(), xiDeviceEvent->time, dev->qtTouchDevice, dev->touchPoints.values());
So it seems WinRT is the only platform which currently does this. QWindowSystemInterface::handleTouchEvent() has a default value for the last parameter, the modifiers. And so we can say this is a platform inconsistency, which makes the bug sufficiently high priority to start fixing it in 5.9, IMO.
Maybe when we have fixed all the platforms, we should remove the parameter default value in 5.10, to enforce that plugins will always pass the modifiers explicitly.
Attachments
Issue Links
- relates to
-
QTBUG-95421 need the ability to delay (increment timestamps of) touch events, as with mouse events
- Reported
Gerrit Reviews
For Gerrit Dashboard: QTBUG-60389 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
362286,9 | Add keyboard modifiers and delay to QTest::touchEvent() | dev | qt/qtbase | Status: NEW | 0 | 0 |