From adf50269e7d1cbe1511a3d52d189d02dda245e10 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 9 May 2018 17:06:56 +0200 Subject: [PATCH] De-inline QCoreApplication::send(Spontaneous)Event There's no clear reason for these functions to be inline; this prepares a tracepoint hook. Change-Id: I3a6110a9333db4850c1d97038d5bfae8ab25d5d8 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 19 +++++++++++++++++++ src/corelib/kernel/qcoreapplication.h | 8 -------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e0ae350f32..df887db0b1 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1399,6 +1399,7 @@ void QCoreApplication::exit(int returnCode) QCoreApplication management of posted events *****************************************************************************/ +#ifndef QT_NO_QOBJECT /*! \fn bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event) @@ -1413,6 +1414,24 @@ void QCoreApplication::exit(int returnCode) \sa postEvent(), notify() */ +bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event) +{ + if (event) + event->spont = false; + return notifyInternal2(receiver, event); +} + +/*! + \internal +*/ +bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event) +{ + if (event) + event->spont = true; + return notifyInternal2(receiver, event); +} + +#endif // QT_NO_QOBJECT /*! \since 4.3 diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index a886c9d1d2..3581970765 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -229,14 +229,6 @@ private: friend class QClassFactory; }; -#ifndef QT_NO_QOBJECT -inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event) -{ if (event) event->spont = false; return notifyInternal2(receiver, event); } - -inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event) -{ if (event) event->spont = true; return notifyInternal2(receiver, event); } -#endif - #ifdef QT_NO_DEPRECATED # define QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context) #else