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/corelib/statemachine | |
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/corelib/statemachine')
-rw-r--r-- | src/corelib/statemachine/qstate_p.h | 8 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine_p.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/statemachine/qstate_p.h b/src/corelib/statemachine/qstate_p.h index 7fb40392e7..ec746caae1 100644 --- a/src/corelib/statemachine/qstate_p.h +++ b/src/corelib/statemachine/qstate_p.h @@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE struct QPropertyAssignment { QPropertyAssignment() - : object(0), explicitlySet(true) {} + : object(nullptr), explicitlySet(true) {} QPropertyAssignment(QObject *o, const QByteArray &n, const QVariant &v, bool es = true) : object(o), propertyName(n), value(v), explicitlySet(es) {} bool objectDeleted() const { return !object; } - void write() const { Q_ASSERT(object != 0); object->setProperty(propertyName, value); } + void write() const { Q_ASSERT(object != nullptr); object->setProperty(propertyName, value); } bool hasTarget(QObject *o, const QByteArray &pn) const { return object == o && propertyName == pn; } @@ -99,8 +99,8 @@ public: QStatePrivate(); ~QStatePrivate(); - static QStatePrivate *get(QState *q) { return q ? q->d_func() : 0; } - static const QStatePrivate *get(const QState *q) { return q? q->d_func() : 0; } + static QStatePrivate *get(QState *q) { return q ? q->d_func() : nullptr; } + static const QStatePrivate *get(const QState *q) { return q? q->d_func() : nullptr; } QList<QAbstractState*> childStates() const; QList<QHistoryState*> historyStates() const; diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h index f3366ca5f7..c66130b8ce 100644 --- a/src/corelib/statemachine/qstatemachine_p.h +++ b/src/corelib/statemachine/qstatemachine_p.h @@ -108,7 +108,7 @@ public: ~QStateMachinePrivate(); static QStateMachinePrivate *get(QStateMachine *q) - { return q ? q->d_func() : 0; } + { return q ? q->d_func() : nullptr; } QState *findLCA(const QList<QAbstractState*> &states, bool onlyCompound = false) const; QState *findLCCA(const QList<QAbstractState*> &states) const; @@ -313,7 +313,7 @@ public: DelayedEvent(QEvent *e, int tid) : event(e), timerId(tid) {} DelayedEvent() - : event(0), timerId(0) {} + : event(nullptr), timerId(0) {} }; QHash<int, DelayedEvent> delayedEvents; QHash<int, int> timerIdToDelayedEventId; |