From e7de332f2bb842058a6f280ded38f66c97e43679 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 20 Sep 2021 13:54:34 +0200 Subject: [PATCH] QmlDesigner: Fix uninitialized variables It shows very well why only one variable per statement should be initialized. Change-Id: I4bef73066583998be545c8930b3f9cbea5bc4e4b Reviewed-by: Knud Dollereder Reviewed-by: Qt CI Bot --- .../components/timelineeditor/timelinesectionitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp index ae80fa3069b..9174b4d49a5 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinesectionitem.cpp @@ -818,8 +818,10 @@ void TimelineRulerSectionItem::setPlaybackLoopTimes(float startFrame, float endF void TimelineRulerSectionItem::extendPlaybackLoop(const QList &positions, bool reset) { if (m_playbackLoopEnabled) { - qreal originalLeft, left = m_playbackLoopStart; - qreal originalRight, right = m_playbackLoopEnd; + qreal originalLeft = m_playbackLoopStart; + qreal left = m_playbackLoopStart; + qreal originalRight = m_playbackLoopEnd; + qreal right = m_playbackLoopEnd; if (reset) { if (positions.count() >= 2) {