summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-05-16 18:46:50 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-05-20 12:26:28 +0000
commitda8ace713a19d2a8c9831ddf50d17607bc4856cc (patch)
tree2e48cee43e46de9ffad45f9b614529410cd35f42 /src/corelib/kernel/qcoreapplication.h
parentf78ef9753c58587a5db292493b2c003a3e0a3144 (diff)
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 <paul.tvete@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.h')
-rw-r--r--src/corelib/kernel/qcoreapplication.h1
1 files changed, 1 insertions, 0 deletions
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;