summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsscene
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/graphicsview/qgraphicsscene
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/graphicsview/qgraphicsscene')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index b8991b5a9a..ba831c292d 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -4960,6 +4960,7 @@ void tst_QGraphicsScene::taskQTBUG_85088_previewTextfailWhenLostFocus()
// focusItem will lose focus
QMouseEvent pressEvent(QEvent::MouseButtonPress, QPointF(0, 0),
+ view.viewport()->mapToGlobal(QPointF()),
Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
QApplication::sendEvent(view.viewport(), &pressEvent);