diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-03-12 11:46:26 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-03-14 07:37:52 +0000 |
commit | 41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch) | |
tree | fd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/dbus | |
parent | b35eec360d4d88d094094fb54c101fad6cee5768 (diff) |
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.
Skipping src/3rdparty, examples/, tests/
Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/dbus')
-rw-r--r-- | src/dbus/qdbusargument_p.h | 6 | ||||
-rw-r--r-- | src/dbus/qdbusconnection_p.h | 10 | ||||
-rw-r--r-- | src/dbus/qdbusintegrator_p.h | 6 | ||||
-rw-r--r-- | src/dbus/qdbuspendingcall_p.h | 2 | ||||
-rw-r--r-- | src/dbus/qdbuspendingreply.h | 2 | ||||
-rw-r--r-- | src/dbus/qdbusutil_p.h | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h index b678b9606f..3553d3d151 100644 --- a/src/dbus/qdbusargument_p.h +++ b/src/dbus/qdbusargument_p.h @@ -71,7 +71,7 @@ class QDBusArgumentPrivate { public: inline QDBusArgumentPrivate(int flags = 0) - : message(0), ref(1), capabilities(flags) + : message(nullptr), ref(1), capabilities(flags) { } virtual ~QDBusArgumentPrivate(); @@ -104,7 +104,7 @@ public: class QDBusMarshaller: public QDBusArgumentPrivate { public: - QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0), ba(0), closeCode(0), ok(true), skipSignature(false) + QDBusMarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr), ba(nullptr), closeCode(0), ok(true), skipSignature(false) { direction = Marshalling; } ~QDBusMarshaller(); @@ -161,7 +161,7 @@ private: class QDBusDemarshaller: public QDBusArgumentPrivate { public: - inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(0) + inline QDBusDemarshaller(int flags) : QDBusArgumentPrivate(flags), parent(nullptr) { direction = Demarshalling; } ~QDBusDemarshaller(); diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index 7769b9ea71..da67a6c5d4 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -115,7 +115,7 @@ public: struct Watcher { - Watcher(): watch(0), read(0), write(0) {} + Watcher(): watch(nullptr), read(nullptr), write(nullptr) {} DBusWatch *watch; QSocketNotifier *read; QSocketNotifier *write; @@ -132,7 +132,7 @@ public: struct SignalHook { - inline SignalHook() : obj(0), midx(-1) { } + inline SignalHook() : obj(nullptr), midx(-1) { } QString service, path, signature; QObject* obj; int midx; @@ -150,9 +150,9 @@ public: { typedef QVector<ObjectTreeNode> DataList; - inline ObjectTreeNode() : obj(0), flags(0) { } + inline ObjectTreeNode() : obj(nullptr), flags(0) { } inline ObjectTreeNode(const QString &n) // intentionally implicit - : name(n), obj(0), flags(0) { } + : name(n), obj(nullptr), flags(0) { } inline bool operator<(const QString &other) const { return name < other; } inline bool operator<(const QStringRef &other) const @@ -194,7 +194,7 @@ public: public: // public methods are entry points from other objects - explicit QDBusConnectionPrivate(QObject *parent = 0); + explicit QDBusConnectionPrivate(QObject *parent = nullptr); ~QDBusConnectionPrivate(); void createBusService(); diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index 3cd029a933..0f7e00fde0 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -106,7 +106,7 @@ class QDBusCallDeliveryEvent: public QMetaCallEvent public: QDBusCallDeliveryEvent(const QDBusConnection &c, int id, QObject *sender, const QDBusMessage &msg, const QVector<int> &types, int f = 0) - : QMetaCallEvent(0, id, 0, sender, -1), connection(c), message(msg), metaTypes(types), flags(f) + : QMetaCallEvent(0, id, nullptr, sender, -1), connection(c), message(msg), metaTypes(types), flags(f) { } void placeMetaCall(QObject *object) override @@ -126,8 +126,8 @@ class QDBusActivateObjectEvent: public QMetaCallEvent public: QDBusActivateObjectEvent(const QDBusConnection &c, QObject *sender, const QDBusConnectionPrivate::ObjectTreeNode &n, - int p, const QDBusMessage &m, QSemaphore *s = 0) - : QMetaCallEvent(0, ushort(-1), 0, sender, -1, 0, 0, 0, s), connection(c), node(n), + int p, const QDBusMessage &m, QSemaphore *s = nullptr) + : QMetaCallEvent(0, ushort(-1), nullptr, sender, -1, 0, nullptr, nullptr, s), connection(c), node(n), pathStartPos(p), message(m), handled(false) { } ~QDBusActivateObjectEvent(); diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h index 10f189ae43..e1f6240f3e 100644 --- a/src/dbus/qdbuspendingcall_p.h +++ b/src/dbus/qdbuspendingcall_p.h @@ -99,7 +99,7 @@ public: // } QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection) - : sentMessage(sent), connection(connection), watcherHelper(0), pending(0) + : sentMessage(sent), connection(connection), watcherHelper(nullptr), pending(nullptr) { } ~QDBusPendingCallPrivate(); bool setReplyCallback(QObject *target, const char *member); diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h index bc5cd92c84..1d7e60ad7f 100644 --- a/src/dbus/qdbuspendingreply.h +++ b/src/dbus/qdbuspendingreply.h @@ -156,7 +156,7 @@ public: { Q_STATIC_ASSERT_X(Index >= 0 && Index < Count, "Index out of bounds"); typedef typename Select<Index>::Type ResultType; - return qdbus_cast<ResultType>(argumentAt(Index), 0); + return qdbus_cast<ResultType>(argumentAt(Index), nullptr); } #endif diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h index 2f187687b8..5a4b461194 100644 --- a/src/dbus/qdbusutil_p.h +++ b/src/dbus/qdbusutil_p.h @@ -134,7 +134,7 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil return false; } - inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = 0) + inline bool checkMemberName(const QString &name, AllowEmptyFlag empty, QDBusError *error, const char *nameType = nullptr) { if (!nameType) nameType = "member"; if (name.isEmpty()) { |