From 6251d4dafc86bcbec09d1962050af9924249d419 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 30 Jun 2015 22:11:15 +0200 Subject: QtCore: Use Q_NULLPTR instead of 0 in all public headers This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/kernel/qcoreapplication.h') diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 1cd835daae..1009fe8439 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -117,7 +117,7 @@ public: static bool sendEvent(QObject *receiver, QEvent *event); static void postEvent(QObject *receiver, QEvent *event, int priority = Qt::NormalEventPriority); - static void sendPostedEvents(QObject *receiver = 0, int event_type = 0); + static void sendPostedEvents(QObject *receiver = Q_NULLPTR, int event_type = 0); static void removePostedEvents(QObject *receiver, int eventType = 0); #if QT_DEPRECATED_SINCE(5, 3) QT_DEPRECATED static bool hasPendingEvents(); @@ -149,7 +149,7 @@ public: static QString translate(const char * context, const char * key, - const char * disambiguation = 0, + const char * disambiguation = Q_NULLPTR, int n = -1); #if QT_DEPRECATED_SINCE(5, 0) enum Encoding { UnicodeUTF8, Latin1, DefaultCodec = UnicodeUTF8, CodecForTr = UnicodeUTF8 }; @@ -231,13 +231,13 @@ inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *ev # define QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context) #else # define QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context) \ - QT_DEPRECATED static inline QString trUtf8(const char *sourceText, const char *disambiguation = 0, int n = -1) \ + QT_DEPRECATED static inline QString trUtf8(const char *sourceText, const char *disambiguation = Q_NULLPTR, int n = -1) \ { return QCoreApplication::translate(#context, sourceText, disambiguation, n); } #endif #define Q_DECLARE_TR_FUNCTIONS(context) \ public: \ - static inline QString tr(const char *sourceText, const char *disambiguation = 0, int n = -1) \ + static inline QString tr(const char *sourceText, const char *disambiguation = Q_NULLPTR, int n = -1) \ { return QCoreApplication::translate(#context, sourceText, disambiguation, n); } \ QT_DECLARE_DEPRECATED_TR_FUNCTIONS(context) \ private: -- cgit v1.2.3