summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs
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/dialogs
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/dialogs')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index cecf7dbdcf..8261bd85d6 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -333,7 +333,7 @@ static bool openContextMenu(QFileDialog &fd)
MenuCloser closer(&fd);
QObject::connect(&timer, &QTimer::timeout, &closer, &MenuCloser::close);
timer.start();
- QContextMenuEvent cme(QContextMenuEvent::Mouse, QPoint(10, 10));
+ QContextMenuEvent cme(QContextMenuEvent::Mouse, QPoint(10, 10), list->viewport()->mapToGlobal(QPoint(10, 10)));
qApp->sendEvent(list->viewport(), &cme); // blocks until menu is closed again.
return true;
}