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 <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2018-05-09 17:06:56 +02:00
parent b46cb00fc0
commit adf50269e7
2 changed files with 19 additions and 8 deletions

View File

@ -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

View File

@ -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