summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-03-20 13:30:09 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-21 01:33:37 +0000
commit938feab4380a7da949ffa753957c05876bd86130 (patch)
tree100f1f8ec8a3c02cccdb5a3d4258d2b9e463e31f
parent3a978d4e54e7e571740db3bcc5d8a7e6c4796cb3 (diff)
Fix warning from deprecated QMouseEvent constructor on macOS
Pass global position explicitly. Change-Id: I4b9bf735635528c4a289be7db6026162d5a7aff6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 9d12f6adbc36fab274fb4a6b46247ad37f1d2ce1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/widgets/widgets/qcombobox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index db7bf9c504..47e7cb8637 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -2558,8 +2558,8 @@ bool QComboBoxPrivate::showNativePopup()
#ifdef Q_OS_MACOS
// The Cocoa popup will swallow any mouse release event.
// We need to fake one here to un-press the button.
- QMouseEvent mouseReleased(QEvent::MouseButtonRelease, q->pos(), Qt::LeftButton,
- Qt::MouseButtons(Qt::LeftButton), Qt::KeyboardModifiers());
+ QMouseEvent mouseReleased(QEvent::MouseButtonRelease, q->pos(), q->mapToGlobal(QPoint(0, 0)),
+ Qt::LeftButton, Qt::MouseButtons(Qt::LeftButton), {});
QCoreApplication::sendEvent(q, &mouseReleased);
#endif