summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qgroupbox
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-01-31 20:41:07 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2022-02-05 17:18:35 +0100
commit6b2c9b81afdb3d1d9b7a2e87819e9545b14810f3 (patch)
tree65c0cfe00b8eb68c6064ebf55abc1f0625167698 /tests/auto/widgets/widgets/qgroupbox
parenta300c3810cd1e91a3946447aaa3bce9e6b8b278f (diff)
Deprecate QContextMenuEvent and QMouseEvent ctors without globalPos
As with QHoverEvent, it's better to require globalPos rather than "initialized to QCursor::pos(), which may not be appropriate" as the docs have pointed out for many years now. This removes the remaining calls to QCursor::pos() in event constructors. Task-number: QTBUG-52430 Task-number: QTBUG-69433 Task-number: QTBUG-100324 Change-Id: I076dae56f37abaad7085cc95dddee453a80a45f3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qgroupbox')
-rw-r--r--tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
index b9def66f7c..c57cd619fa 100644
--- a/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
+++ b/tests/auto/widgets/widgets/qgroupbox/tst_qgroupbox.cpp
@@ -614,7 +614,8 @@ void tst_QGroupBox::task_QTBUG_15519_propagateMouseEvents()
void tst_QGroupBox::sendMouseMoveEvent(QWidget *widget, const QPoint &localPos)
{
// Send a MouseMove event without actually moving the pointer
- QMouseEvent event(QEvent::MouseMove, localPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+ QMouseEvent event(QEvent::MouseMove, localPos, widget->mapToGlobal(localPos),
+ Qt::NoButton, Qt::NoButton, Qt::NoModifier);
QApplication::sendEvent(widget, &event);
}