summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-04-16 15:44:16 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-07-18 02:24:45 +0000
commit9d98584a835962ca7ad870bbede8f6ab7f66b6bf (patch)
tree6d001b43665f04733c904eb67d101494846abbe1 /src/corelib/kernel/qcoreapplication.h
parent01f800ae6f8611a4218b7bbf5953dc896cac5767 (diff)
Make the event delivery go through some more static functions
This commit makes QCoreApplicationPrivate::checkReceiverThread, notify_helper, and sendThroughObjectEventFilters be static functions, since they only deal with global data or the parameters only. Making notifyInternal would have been binary incompatible (it's called from inline functions QCoreApplication::sendSpontaneousEvent and QCoreApplication::sendEvent), so instead add a new static notifyInternal2 and mark the older function deprecated and to be removed in Qt 6. Change-Id: I27eaacb532114dd188c4ffff13d59fe3b0661489 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.h')
-rw-r--r--src/corelib/kernel/qcoreapplication.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 1009fe8439..d865c4e7a8 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -194,7 +194,10 @@ protected:
private:
#ifndef QT_NO_QOBJECT
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event);
- bool notifyInternal(QObject *receiver, QEvent *event);
+# if QT_DEPRECATED_SINCE(5,6)
+ QT_DEPRECATED bool notifyInternal(QObject *receiver, QEvent *event); // ### Qt6 BIC: remove me
+# endif
+ static bool notifyInternal2(QObject *receiver, QEvent *);
#endif
void init();
@@ -221,10 +224,10 @@ private:
#ifndef QT_NO_QOBJECT
inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event)
-{ if (event) event->spont = false; return self ? self->notifyInternal(receiver, event) : false; }
+{ if (event) event->spont = false; return notifyInternal2(receiver, event); }
inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event)
-{ if (event) event->spont = true; return self ? self->notifyInternal(receiver, event) : false; }
+{ if (event) event->spont = true; return notifyInternal2(receiver, event); }
#endif
#ifdef QT_NO_DEPRECATED