Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.0.3
-
None
-
930da44767dcd0ccb50aaf725e3cbac99eaf13ea (qt/qtdeclarative/dev) ec06bd897e06d3a931e726f76cec146768c6e1b0 (qt/qtdeclarative/6.2) 1775bbc6d4231fd10ccfcea006d78d8769b854a2 (qt/qtdeclarative/6.1)
Description
I noticed a strange auto test failure when porting from Qt 5.15 to Qt 6.
The issue can be observed in Slate, using https://github.com/mitchcurtis/slate/commit/5b34f963654cb705cafa2a0eaf8f17bdd7883771 from the qt-6 branch. Either:
- Run test-app with rulersAndGuides:ImageType as an application argument (might take several runs to reproduce, especially when debugging), or
- Run app, and drag a guide down as shown here: qtbug92563.mp4
Unfortunately the minimal example I created doesn't reproduce the issue:
Here is the relevant auto test output:
QDEBUG : tst_App::rulersAndGuides(ImageType) @@@ ABOUT TO PRESS QDEBUG : tst_App::rulersAndGuides(ImageType) === void __cdecl ImageCanvas::mousePressEvent(class QMouseEvent *) QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: updating cursor pos to QPoint(70,30)... QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: ... updated cursor pos - mCursorX=70 mCursorY=30 mCursorPaneX=70 mCursorPaneY=30 mCursorSceneX=50 mCursorSceneY=10 mCursorSceneFX=50 mCursorSceneFY=10 QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.events: mousePressEvent - QMouseEvent(MouseButtonPress LeftButton pos=70,30 scn=70,70 gbl=329,159 dev=QPointingDevice("core pointer" Mouse id=1)) mousePressEvent - mPressPosition: QPoint(70,30) mPressScenePosition: QPoint(50,10) QDEBUG : tst_App::rulersAndGuides(ImageType) @@@ ABOUT TO MOVE QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.events: mouseMoveEvent - QMouseEvent(MouseMove btns=LeftButton pos=70,40 scn=70,80 gbl=329,169 dev=QPointingDevice("core pointer" Mouse id=1)) QDEBUG : tst_App::rulersAndGuides(ImageType) === void __cdecl ImageCanvas::mouseMoveEvent(class QMouseEvent *) QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: updating cursor pos to QPoint(70,40)... QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: ... updated cursor pos - mCursorX=70 mCursorY=40 mCursorPaneX=70 mCursorPaneY=40 mCursorSceneX=50 mCursorSceneY=20 mCursorSceneFX=50 mCursorSceneFY=20 QDEBUG : tst_App::rulersAndGuides(ImageType) @@@ ABOUT TO RELEASE QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.events: mouseReleaseEvent - QMouseEvent(MouseButtonRelease LeftButton pos=70,40 scn=70,80 gbl=329,169 dev=QPointingDevice("core pointer" Mouse id=1)) mCursorX: 70 mCursorY: 40 mCursorSceneX: 50 mCursorSceneY: 20 QDEBUG : tst_App::rulersAndGuides(ImageType) === void __cdecl ImageCanvas::mouseReleaseEvent(class QMouseEvent *) QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: updating cursor pos to QPoint(70,40)... QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: ... updated cursor pos - mCursorX=70 mCursorY=40 mCursorPaneX=70 mCursorPaneY=40 mCursorSceneX=50 mCursorSceneY=20 mCursorSceneFX=50 mCursorSceneFY=20 QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.events.hover: hoverMoveEvent: QPointF(70,30) QDEBUG : tst_App::rulersAndGuides(ImageType) this is #2 hoverMoveEvent that occurred at {70, 30} QDEBUG : tst_App::rulersAndGuides(ImageType) !!! this hoverMoveEvent causes issues - the actual position of the mouse is {70, 40}! QDEBUG : tst_App::rulersAndGuides(ImageType) === void __cdecl ImageCanvas::hoverMoveEvent(class QHoverEvent *) QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: updating cursor pos to QPoint(70,30)... QDEBUG : tst_App::rulersAndGuides(ImageType) app.canvas.cursorpos: ... updated cursor pos - mCursorX=70 mCursorY=30 mCursorPaneX=70 mCursorPaneY=30 mCursorSceneX=50 mCursorSceneY=10 mCursorSceneFX=50 mCursorSceneFY=10 FAIL! : tst_App::rulersAndGuides(ImageType) Compared values are not the same Actual (window->cursor().shape()): BlankCursor Expected (Qt::OpenHandCursor) : OpenHandCursor C:\dev\slate\tests\auto\tst_app.cpp(3381) : failure location PASS : tst_App::cleanupTestCase() Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 743ms ********* Finished testing of tst_App ********* 17:07:32: C:\dev\slate-Desktop_Qt_6_0_3_MSVC2019_64bit-Debug\Debug_Desktop__a2fe11b9e0029ffa\install-root\\test-app.exe exited with code 1
You can see that hoverMoveEvent is called with a position of {70, 30}, when the mouse is actually at {70, 40}.
Stepping into the hoverMoveEvent() call for the extra event, I see this stack trace:
1 ImageCanvas::hoverMoveEvent imagecanvas.cpp 3185 0x7ff9e1fcb66c 2 QQuickItem::event qquickitem.cpp 8227 0x7ff9d460d0ba 3 ImageCanvas::event imagecanvas.cpp 2842 0x7ff9e1fc8f63 4 QApplicationPrivate::notify_helper qapplication.cpp 3401 0x7ff9d34553df 5 QApplication::notify qapplication.cpp 2763 0x7ff9d344f52b 6 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1040 0x7ff9e12fbb75 7 QCoreApplication::sendEvent qcoreapplication.cpp 1436 0x7ff9e12f96d3 8 QQuickWindowPrivate::sendHoverEvent qquickwindow.cpp 2121 0x7ff9d4819ba6 9 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2169 0x7ff9d48195d5 10 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 11 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 12 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 13 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 14 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 15 QQuickWindowPrivate::deliverHoverEvent qquickwindow.cpp 2149 0x7ff9d4819258 16 QQuickWindowPrivate::flushFrameSynchronousEvents qquickwindow.cpp 2612 0x7ff9d4815793 17 QSGThreadedRenderLoop::polishAndSync qsgthreadedrenderloop.cpp 1518 0x7ff9d4b9ac89 18 QSGThreadedRenderLoop::handleUpdateRequest qsgthreadedrenderloop.cpp 1384 0x7ff9d4b9991d 19 QQuickWindow::event qquickwindow.cpp 1967 0x7ff9d480c6b3 20 QApplicationPrivate::notify_helper qapplication.cpp 3401 0x7ff9d34553df 21 QApplication::notify qapplication.cpp 2763 0x7ff9d344f52b 22 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1040 0x7ff9e12fbb75 23 QCoreApplication::sendEvent qcoreapplication.cpp 1436 0x7ff9e12f96d3 24 QPlatformWindow::deliverUpdateRequest qplatformwindow.cpp 810 0x7ff9d67fccb6 25 QPlatformWindow::windowEvent qplatformwindow.cpp 491 0x7ff9d67fc56d 26 QWindowsWindow::windowEvent qwindowswindow.cpp 2432 0x7ff9d3182c41 27 QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow qguiapplication.cpp 1998 0x7ff9d676b812 28 QApplication::notify qapplication.cpp 2665 0x7ff9d344f0eb 29 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1040 0x7ff9e12fbb75 30 QCoreApplication::sendEvent qcoreapplication.cpp 1436 0x7ff9e12f96d3 31 QEventDispatcherWin32Private::sendTimerEvent qeventdispatcher_win.cpp 428 0x7ff9e16db7a7 32 QEventDispatcherWin32::event qeventdispatcher_win.cpp 918 0x7ff9e16dab1b 33 QApplicationPrivate::notify_helper qapplication.cpp 3401 0x7ff9d34553df 34 QApplication::notify qapplication.cpp 2763 0x7ff9d344f52b 35 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1040 0x7ff9e12fbb75 36 QCoreApplication::sendEvent qcoreapplication.cpp 1436 0x7ff9e12f96d3 37 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1794 0x7ff9e12fdfdd 38 QEventDispatcherWin32::sendPostedEvents qeventdispatcher_win.cpp 933 0x7ff9e16dadb3 39 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 80 0x7ff9d6e61199 40 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 502 0x7ff9e16d8e3b 41 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 72 0x7ff9d6e61139 42 QCoreApplication::processEvents qcoreapplication.cpp 1262 0x7ff9e12f94bf 43 QTest::mouseEvent qtestmouse.h 156 0x7ff7d44e47cf 44 QTest::mouseRelease qtestmouse.h 166 0x7ff7d45fe752
Attachments
Issue Links
- relates to
-
QTBUG-92000 tst_qquickitem::hoverEvent is flaky on Ubuntu 20.04
-
- Closed
-
- resulted in
-
QTBUG-94971 QHoverEvent::scenePosition() is actually local position
-
- Closed
-
For Gerrit Dashboard: QTBUG-92563 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
357618,2 | QQuickDeliveryAgentPrivate: fix don't send hoverEvent | dev | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |
358100,3 | QQDeliveryAgent: keep lastMousePosition updated during dragging | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
358228,2 | QQDeliveryAgent: keep lastMousePosition updated during dragging | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
358230,3 | QQDeliveryAgent: keep lastMousePosition updated during dragging | 6.1 | qt/qtdeclarative | Status: MERGED | +2 | 0 |