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/qabstractanimation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/animation/qabstractanimation.cpp') diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 46b01449d4..b7136dc055 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -220,7 +220,7 @@ QUnifiedTimer::QUnifiedTimer() : QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL), currentAnimationIdx(0), insideTick(false), insideRestart(false), consistentTiming(false), slowMode(false), startTimersPending(false), stopTimerPending(false), - slowdownFactor(5.0f), profilerCallback(0), + slowdownFactor(5.0f), profilerCallback(nullptr), driverStartTime(0), temporalDrift(0) { time.invalidate(); @@ -922,7 +922,7 @@ qint64 QAnimationDriver::elapsed() const The default animation driver just spins the timer... */ QDefaultAnimationDriver::QDefaultAnimationDriver(QUnifiedTimer *timer) - : QAnimationDriver(0), m_unified_timer(timer) + : QAnimationDriver(nullptr), m_unified_timer(timer) { connect(this, SIGNAL(started()), this, SLOT(startTimer())); connect(this, SIGNAL(stopped()), this, SLOT(stopTimer())); @@ -1035,7 +1035,7 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState) \sa QVariantAnimation, QAnimationGroup */ QAbstractAnimation::QAbstractAnimation(QObject *parent) - : QObject(*new QAbstractAnimationPrivate, 0) + : QObject(*new QAbstractAnimationPrivate, nullptr) { // Allow auto-add on reparent setParent(parent); @@ -1045,7 +1045,7 @@ QAbstractAnimation::QAbstractAnimation(QObject *parent) \internal */ QAbstractAnimation::QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent) - : QObject(dd, 0) + : QObject(dd, nullptr) { // Allow auto-add on reparent setParent(parent); -- cgit v1.2.3