From ece0c0a5e7e0b18beb58ccd868bde54c7be64f78 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 22 Nov 2019 14:46:58 +0100 Subject: Tidy nullptr usage Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/corelib/animation/qsequentialanimationgroup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/animation/qsequentialanimationgroup.cpp') diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 66e346a2fe..98ac04a14f 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -282,7 +282,7 @@ QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs) if (index < 0 || index > d->animations.size()) { qWarning("QSequentialAnimationGroup::insertPause: index is out of bounds"); - return 0; + return nullptr; } QPauseAnimation *pause = new QPauseAnimation(msecs); @@ -430,7 +430,7 @@ void QSequentialAnimationGroupPrivate::setCurrentAnimation(int index, bool inter if (index == -1) { Q_ASSERT(animations.isEmpty()); currentAnimationIndex = -1; - currentAnimation = 0; + currentAnimation = nullptr; return; } @@ -503,7 +503,7 @@ void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished() */ void QSequentialAnimationGroupPrivate::animationInsertedAt(int index) { - if (currentAnimation == 0) + if (currentAnimation == nullptr) setCurrentAnimation(0); // initialize the current animation if (currentAnimationIndex == index -- cgit v1.2.3