diff options
author | Jesus Fernandez <jesus.fernandez@qt.io> | 2017-09-05 09:49:55 +0200 |
---|---|---|
committer | Jesus Fernandez <Jesus.Fernandez@qt.io> | 2017-09-05 14:00:39 +0000 |
commit | aa95e9e98618d8838ba6d83f3cc365113ca6f410 (patch) | |
tree | 6d777afb8440af118dfbd84d3ef0adcaf7fc990d /src/corelib/kernel/qobject_p.h | |
parent | cf24d203850cd87e31bc123407e7ae126be9961c (diff) |
Fix zero-as-null-pointer-constant warning in QObject
Change-Id: Icf0c836b96cd750edeee71c144e2bd9917a96815
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'src/corelib/kernel/qobject_p.h')
-rw-r--r-- | src/corelib/kernel/qobject_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index ad88bcf274..ddae349528 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com> ** Contact: https://www.qt.io/licensing/ ** @@ -145,7 +145,7 @@ public: ushort connectionType : 3; // 0 == auto, 1 == direct, 2 == queued, 4 == blocking ushort isSlotObject : 1; ushort ownArgumentTypes : 1; - Connection() : nextConnectionList(0), ref_(2), ownArgumentTypes(true) { + Connection() : nextConnectionList(nullptr), ref_(2), ownArgumentTypes(true) { //ref_ is 2 for the use in the internal lists, and for the use in QMetaObject::Connection } ~Connection(); @@ -160,7 +160,7 @@ public: }; // ConnectionList is a singly-linked list struct ConnectionList { - ConnectionList() : first(0), last(0) {} + ConnectionList() : first(nullptr), last(nullptr) {} Connection *first; Connection *last; }; @@ -200,7 +200,7 @@ public: } static const QObjectPrivate *get(const QObject *o) { return o->d_func(); } - int signalIndex(const char *signalName, const QMetaObject **meta = 0) const; + int signalIndex(const char *signalName, const QMetaObject **meta = nullptr) const; inline bool isSignalConnected(uint signalIdx, bool checkDeclarative = true) const; inline bool isDeclarativeSignalConnected(uint signalIdx) const; @@ -376,12 +376,12 @@ class Q_CORE_EXPORT QMetaCallEvent : public QEvent { public: QMetaCallEvent(ushort method_offset, ushort method_relative, QObjectPrivate::StaticMetaCallFunction callFunction , const QObject *sender, int signalId, - int nargs = 0, int *types = 0, void **args = 0, QSemaphore *semaphore = 0); + int nargs = 0, int *types = nullptr, void **args = nullptr, QSemaphore *semaphore = nullptr); /*! \internal \a signalId is in the signal index range (see QObjectPrivate::signalIndex()). */ QMetaCallEvent(QtPrivate::QSlotObjectBase *slotObj, const QObject *sender, int signalId, - int nargs = 0, int *types = 0, void **args = 0, QSemaphore *semaphore = 0); + int nargs = 0, int *types = nullptr, void **args = nullptr, QSemaphore *semaphore = nullptr); ~QMetaCallEvent(); |