From 0bb82245f83b47adf654d34d3e273dad1e39bd27 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 8 Oct 2009 14:12:52 +1000 Subject: Call QApplication::exit() repeatedly This is necessary incase we want to exit before we've entered the event loop. --- tools/qmlviewer/qfxtester.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index 87ab43b..216685c 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -118,12 +118,14 @@ void QFxTester::imagefailure() void QFxTester::complete() { + if (options & QmlViewer::ExitOnComplete) + QApplication::exit(hasFailed?-1:0); + if (hasCompleted) return; hasCompleted = true; - if (options & QmlViewer::ExitOnComplete) - QApplication::exit(hasFailed?-1:0); - else if (options & QmlViewer::Play) + + if (options & QmlViewer::Play) qWarning("Script playback complete"); } -- cgit v0.12