From 86faae02ffa0067b46b22043cb138230451387ac Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 4 Nov 2009 16:42:38 +1000 Subject: Fix 5f19daab6baba7d09853058355a66090a3781430 --- tools/qmlviewer/qfxtester.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index 287771b..dfa628d 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -306,17 +306,15 @@ void QmlGraphicsTester::updateCurrentTime(int msec) QObject *event = testscript->event(testscriptidx); if (QmlGraphicsVisualTestFrame *frame = qobject_cast(event)) { - if ((options & QmlViewer::TestImages) && (options & QmlViewer::Record)) - break; // recording and playing, no point "testing" results if (frame->msec() < msec) { - if (options & QmlViewer::TestImages) { + if (options & QmlViewer::TestImages && !(options & QmlViewer::Record)) { qWarning() << "QmlGraphicsTester: Extra frame. Seen:" << msec << "Expected:" << frame->msec(); imagefailure(); } } else if (frame->msec() == msec) { if (!frame->hash().isEmpty() && frame->hash().toUtf8() != fe.hash.toHex()) { - if (options & QmlViewer::TestImages) { + if (options & QmlViewer::TestImages && !(options & QmlViewer::Record)) { qWarning() << "QmlGraphicsTester: Mismatched frame hash. Seen:" << fe.hash.toHex() << "Expected:" << frame->hash().toUtf8(); @@ -327,7 +325,7 @@ void QmlGraphicsTester::updateCurrentTime(int msec) break; } - if (options & QmlViewer::TestImages && !frame->image().isEmpty()) { + if (options & QmlViewer::TestImages && !(options & QmlViewer::Record) && !frame->image().isEmpty()) { QImage goodImage(frame->image().toLocalFile()); if (goodImage != img) { QString reject(frame->image().toLocalFile() + ".reject.png"); -- cgit v0.12