summaryrefslogtreecommitdiffstats
path: root/src/corelib/json
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-18 11:49:52 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-19 11:53:55 +0000
commit58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch)
tree7f600686e4dd92681bec09ac745a9dcd4425844b /src/corelib/json
parent47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff)
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/json')
-rw-r--r--src/corelib/json/qjsonarray.h4
-rw-r--r--src/corelib/json/qjsondocument.h2
-rw-r--r--src/corelib/json/qjsonobject.h4
-rw-r--r--src/corelib/json/qjsonvalue.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/json/qjsonarray.h b/src/corelib/json/qjsonarray.h
index ddba2ca78e..8d41138c97 100644
--- a/src/corelib/json/qjsonarray.h
+++ b/src/corelib/json/qjsonarray.h
@@ -133,7 +133,7 @@ public:
typedef QJsonValueRef reference;
typedef QJsonValueRefPtr pointer;
- inline iterator() : a(Q_NULLPTR), i(0) { }
+ inline iterator() : a(nullptr), i(0) { }
explicit inline iterator(QJsonArray *array, int index) : a(array), i(index) { }
inline QJsonValueRef operator*() const { return QJsonValueRef(a, i); }
@@ -178,7 +178,7 @@ public:
typedef QJsonValue reference;
typedef QJsonValuePtr pointer;
- inline const_iterator() : a(Q_NULLPTR), i(0) { }
+ inline const_iterator() : a(nullptr), i(0) { }
explicit inline const_iterator(const QJsonArray *array, int index) : a(array), i(index) { }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
inline const_iterator(const const_iterator &o) : a(o.a), i(o.i) {} // ### Qt 6: Removed so class can be trivially-copyable
diff --git a/src/corelib/json/qjsondocument.h b/src/corelib/json/qjsondocument.h
index 4e76af21e2..e1730cf374 100644
--- a/src/corelib/json/qjsondocument.h
+++ b/src/corelib/json/qjsondocument.h
@@ -129,7 +129,7 @@ public:
Compact
};
- static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = Q_NULLPTR);
+ static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error = 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 c77e2164a8..610bce694c 100644
--- a/src/corelib/json/qjsonobject.h
+++ b/src/corelib/json/qjsonobject.h
@@ -135,7 +135,7 @@ public:
typedef QJsonValueRef reference;
typedef QJsonValuePtr pointer;
- Q_DECL_CONSTEXPR inline iterator() : o(Q_NULLPTR), i(0) {}
+ Q_DECL_CONSTEXPR inline iterator() : o(nullptr), i(0) {}
Q_DECL_CONSTEXPR inline iterator(QJsonObject *obj, int index) : o(obj), i(index) {}
inline QString key() const { return o->keyAt(i); }
@@ -178,7 +178,7 @@ public:
typedef QJsonValue reference;
typedef QJsonValuePtr pointer;
- Q_DECL_CONSTEXPR inline const_iterator() : o(Q_NULLPTR), i(0) {}
+ Q_DECL_CONSTEXPR inline const_iterator() : o(nullptr), i(0) {}
Q_DECL_CONSTEXPR inline const_iterator(const QJsonObject *obj, int index)
: o(obj), i(index) {}
inline const_iterator(const iterator &other)
diff --git a/src/corelib/json/qjsonvalue.h b/src/corelib/json/qjsonvalue.h
index 5d5ec72605..96538ebbf9 100644
--- a/src/corelib/json/qjsonvalue.h
+++ b/src/corelib/json/qjsonvalue.h
@@ -82,7 +82,7 @@ public:
QJsonValue(QLatin1String s);
#ifndef QT_NO_CAST_FROM_ASCII
inline QT_ASCII_CAST_WARN QJsonValue(const char *s)
- : d(Q_NULLPTR), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }
+ : d(nullptr), t(String) { stringDataFromQStringHelper(QString::fromUtf8(s)); }
#endif
QJsonValue(const QJsonArray &a);
QJsonValue(const QJsonObject &o);