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/json/qjsonarray.h | 4 ++-- src/corelib/json/qjsondocument.h | 2 +- src/corelib/json/qjsonobject.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/json') diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h index 6148642106..311753d977 100644 --- a/src/corelib/json/qjsonarray.h +++ b/src/corelib/json/qjsonarray.h @@ -107,7 +107,7 @@ public: typedef QJsonValueRef reference; typedef QJsonValueRefPtr pointer; - inline iterator() : a(0), i(0) { } + inline iterator() : a(Q_NULLPTR), i(0) { } explicit inline iterator(QJsonArray *array, int index) : a(array), i(index) { } inline QJsonValueRef operator*() const { return QJsonValueRef(a, i); } @@ -152,7 +152,7 @@ public: typedef QJsonValue reference; typedef QJsonValuePtr pointer; - inline const_iterator() : a(0), i(0) { } + inline const_iterator() : a(Q_NULLPTR), i(0) { } explicit inline const_iterator(const QJsonArray *array, int index) : a(array), i(index) { } inline const_iterator(const const_iterator &o) : a(o.a), i(o.i) {} inline const_iterator(const iterator &o) : a(o.a), i(o.i) {} diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h index 285b42c6c8..d7a88b2f15 100644 --- a/src/corelib/json/qjsondocument.h +++ b/src/corelib/json/qjsondocument.h @@ -106,7 +106,7 @@ public: Compact }; - static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = 0); + static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = Q_NULLPTR); #ifdef Q_QDOC QByteArray toJson(JsonFormat format = Indented) const; diff --git a/src/corelib/json/qjsonobject.h b/src/corelib/json/qjsonobject.h index 5f24ac3ac8..19c938fd83 100644 --- a/src/corelib/json/qjsonobject.h +++ b/src/corelib/json/qjsonobject.h @@ -105,7 +105,7 @@ public: typedef QJsonValue value_type; typedef QJsonValueRef reference; - Q_DECL_CONSTEXPR inline iterator() : o(0), i(0) {} + Q_DECL_CONSTEXPR inline iterator() : o(Q_NULLPTR), i(0) {} Q_DECL_CONSTEXPR inline iterator(QJsonObject *obj, int index) : o(obj), i(index) {} inline QString key() const { return o->keyAt(i); } @@ -147,7 +147,7 @@ public: typedef QJsonValue value_type; typedef QJsonValue reference; - Q_DECL_CONSTEXPR inline const_iterator() : o(0), i(0) {} + Q_DECL_CONSTEXPR inline const_iterator() : o(Q_NULLPTR), i(0) {} Q_DECL_CONSTEXPR inline const_iterator(const QJsonObject *obj, int index) : o(obj), i(index) {} inline const_iterator(const iterator &other) -- cgit v1.2.3