qt6-bb10/tests/auto/widgets/kernel
Volker Hilsheimer 4f95e66f94 QWidget: deliver DragLeave events symmetrically
If a widget received a DragEnter event that it didn't accept, then the
UnderMouse widget attribute gets set. But the drag manager never got a
drag target, so the DragLeave event was never delivered, leaving the
UnderMouse attribute set incorrectly.

We always need to send DragLeave events to the receiver, even if the
DragEnter or DragMove was not accepted. Otherwise we are not in balance,
and the UnderMouse attribute will remain set.

This is a change of behavior and a very old bug, so only fixing this in
unreleased branches. Test case added to verify that explicitly generated
drag events result in the correct enter/leave events.

[ChangeLog][QtWidgets][QWidget] DragLeave events are now always sent to
the widget the mouse is leaving, even if it didn't accept the DragEnter
event.

Fixes: QTBUG-50403
Pick-to: 6.7
Change-Id: I5eae49da000fb4fea81f1767f0e73a06a6b78975
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-12-20 20:46:39 +01:00
..
qaction CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qactiongroup CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qapplication Debounce QDeferredDeleteEvents in QObject::deleteLater() 2023-12-15 18:21:22 +01:00
qboxlayout CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qformlayout Purge empty BLACKLIST files from tests 2023-11-24 18:09:16 +01:00
qgesturerecognizer tst_QGestureRecognizer: port away from Q_FOREACH 2023-08-07 23:56:10 +02:00
qgridlayout QtWidgets tests: port remaining users away from Q_FOREACH 2023-08-14 23:11:54 +03:00
qlayout CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qshortcut Use QtGui to match QWindow based shortcuts, even when QApplication is used 2023-10-11 20:32:05 +02:00
qsizepolicy CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qstackedlayout CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qtooltip Set correct content size for tool tip label 2023-12-15 19:42:19 +01:00
qwidget QWidget: deliver DragLeave events symmetrically 2023-12-20 20:46:39 +01:00
qwidget_window Tests: remove blacklisted CIs no longer available 2023-12-06 22:07:44 +01:00
qwidgetaction CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qwidgetmetatype CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qwidgetrepaintmanager CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qwidgetsvariant CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
qwindowcontainer CMake: Make widgets tests standalone projects 2023-07-05 15:09:32 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00