diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-08 04:12:52 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-08 04:12:52 (GMT) |
commit | 0bb82245f83b47adf654d34d3e273dad1e39bd27 (patch) | |
tree | 18dd4888d4e60187f35e08b8256b979df38434ca /tools/qmlviewer | |
parent | 5ab2f873e9eb91071bad3cc04c38f84e4b1cbdda (diff) | |
download | Qt-0bb82245f83b47adf654d34d3e273dad1e39bd27.zip Qt-0bb82245f83b47adf654d34d3e273dad1e39bd27.tar.gz Qt-0bb82245f83b47adf654d34d3e273dad1e39bd27.tar.bz2 |
Call QApplication::exit() repeatedly
This is necessary incase we want to exit before we've entered the event
loop.
Diffstat (limited to 'tools/qmlviewer')
-rw-r--r-- | tools/qmlviewer/qfxtester.cpp | 8 |
1 files 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"); } |