From da8ace713a19d2a8c9831ddf50d17607bc4856cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 16 May 2017 18:46:50 +0200 Subject: QWidgetWindow: Forward incoming events with their original spontaneous state The events may come from QPA, as spontaneous events, or from other parts of Qt, as non-spontaneous events. We should keep the state of the original event. Introduces QCoreApplication::forwardEvent() as a wrapper around the opaquely named notifyInternal2. Ideally this would be the behavior of sendEvent, with an enum argument to override the flag, but that ship has sailed. Change-Id: Ib0209f2b99744bd10590c63239ee7a97b60be4fd Reviewed-by: Paul Olav Tvete Reviewed-by: Lars Knoll --- src/corelib/kernel/qcoreapplication.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/kernel/qcoreapplication.h') diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 0fee7b3de8..34133533f0 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -206,6 +206,7 @@ private: QT_DEPRECATED bool notifyInternal(QObject *receiver, QEvent *event); // ### Qt6 BIC: remove me # endif static bool notifyInternal2(QObject *receiver, QEvent *); + static bool forwardEvent(QObject *receiver, QEvent *event, QEvent *originatingEvent = nullptr); #endif static QCoreApplication *self; -- cgit v1.2.3