From 2b50e205780f007dd5c2955cd7d492d3f5f909b1 Mon Sep 17 00:00:00 2001 From: Xizhi Zhu Date: Sun, 19 Feb 2012 10:15:18 +0100 Subject: Merges several overloaded functions in QCoreApplication. The source compatibility is kept. Change-Id: If66053b271d65062b3c0ce6ec66c8394a37b4e3e Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication.h') diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index d1fba3b63c..18266a9a2c 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -110,12 +110,9 @@ public: static void exit(int retcode=0); static bool sendEvent(QObject *receiver, QEvent *event); - static void postEvent(QObject *receiver, QEvent *event); - static void postEvent(QObject *receiver, QEvent *event, int priority); - static void sendPostedEvents(QObject *receiver, int event_type); - static void sendPostedEvents(); - static void removePostedEvents(QObject *receiver); - static void removePostedEvents(QObject *receiver, int eventType); + static void postEvent(QObject *receiver, QEvent *event, int priority = Qt::NormalEventPriority); + static void sendPostedEvents(QObject *receiver = 0, int event_type = 0); + static void removePostedEvents(QObject *receiver, int eventType = 0); static bool hasPendingEvents(); static QAbstractEventDispatcher *eventDispatcher(); static void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher); @@ -211,8 +208,6 @@ inline bool QCoreApplication::sendEvent(QObject *receiver, QEvent *event) inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *event) { if (event) event->spont = true; return self ? self->notifyInternal(receiver, event) : false; } -inline void QCoreApplication::sendPostedEvents() { sendPostedEvents(0, 0); } - #ifdef QT_NO_TRANSLATION // Simple versions inline QString QCoreApplication::translate(const char *, const char *sourceText, -- cgit v1.2.3