Doc: don't use deprecated function in QMenu snippets

QMouseEvent::globalPos() is deprecated - replace it with
QMouseEvent::globalPosition().toPoint()

Pick-to: 6.6 6.5
Fixes: QTBUG-124343
Change-Id: I6f862a9a640da11d756dae58ffae8c6d7fc24e02
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit 001d88ae38435a2d108178c5d396839986985bc4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-04-12 21:41:08 +02:00 committed by Qt Cherry-pick Bot
parent 74563f95ae
commit 67372f31ae

View File

@ -12,7 +12,7 @@ exec(somewidget.mapToGlobal(QPoint(0,0)));
//! [2]
exec(e->globalPos());
exec(e->globalPosition().toPoint());
//! [2]
@ -27,7 +27,7 @@ exec(somewidget.mapToGlobal(QPoint(0, 0)));
//! [5]
exec(e->globalPos());
exec(e->globalPosition().toPoint());
//! [5]