Fix warning from deprecated QMouseEvent constructor on macOS
Pass global position explicitly. Pick-to: 6.3 Change-Id: I4b9bf735635528c4a289be7db6026162d5a7aff6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
f3466fad53
commit
9d12f6adbc
@ -2558,8 +2558,8 @@ bool QComboBoxPrivate::showNativePopup()
|
|||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
// The Cocoa popup will swallow any mouse release event.
|
// The Cocoa popup will swallow any mouse release event.
|
||||||
// We need to fake one here to un-press the button.
|
// We need to fake one here to un-press the button.
|
||||||
QMouseEvent mouseReleased(QEvent::MouseButtonRelease, q->pos(), Qt::LeftButton,
|
QMouseEvent mouseReleased(QEvent::MouseButtonRelease, q->pos(), q->mapToGlobal(QPoint(0, 0)),
|
||||||
Qt::MouseButtons(Qt::LeftButton), Qt::KeyboardModifiers());
|
Qt::LeftButton, Qt::MouseButtons(Qt::LeftButton), {});
|
||||||
QCoreApplication::sendEvent(q, &mouseReleased);
|
QCoreApplication::sendEvent(q, &mouseReleased);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user