From f3174fa642f2ccd2c0cad9604878abf2d158aec4 Mon Sep 17 00:00:00 2001 From: David Laing Date: Fri, 16 Mar 2012 15:03:30 +1000 Subject: Coverity fixes, the sequel. Change-Id: Icbe91d0f348e60a24599e2f93a719fafedf26708 Reviewed-by: Alex Wilson --- tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/plugins') diff --git a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp index cd988ae6..37d15d4a 100644 --- a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp +++ b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp @@ -324,7 +324,7 @@ void QDeclarativePinchGenerator::timerEvent(QTimerEvent *event) Q_ASSERT(state_ == Replaying); // Create touchevent. May have one or two touchpoints. - QTouchEvent* touchEvent; + QTouchEvent* touchEvent = 0; switch (swipes_.at(masterSwipe_)->touchPoints.at(replayBookmark_).state()) { case (Qt::TouchPointPressed): touchEvent = new QTouchEvent(QEvent::TouchBegin,NULL,Qt::NoModifier,Qt::TouchPointReleased); @@ -337,7 +337,7 @@ void QDeclarativePinchGenerator::timerEvent(QTimerEvent *event) break; default: Q_ASSERT(false); - break; + return; } // Set touch points. Master swipe has touchpoints as it was chosen to have more touchpoints. // For the other swipe we need to check. -- cgit v1.2.1