qglobal.h(501) : warning C4804: '-' : unsafe use of type 'bool' in operation
global/qglobal.h(501) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
tst_qcamera.cpp(507) : see reference to function template instantiation 'T qAbs<bool>(const T &)' being compiled
Change-Id: Ifd467b5536a0d386f592ae339129b3ebfb7b8838
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
QCOMPARE(metadata[0].toInt(), id);
QCOMPARE(metadata[1].toString(), QMediaMetaData::DateTimeOriginal);
QDateTime captureTime = metadata[2].value<QVariant>().value<QDateTime>();
- QVERIFY(qAbs(captureTime.secsTo(QDateTime::currentDateTime()) < 5)); //it should not takes more than 5 seconds for signal to arrive here
+ const qint64 dt = captureTime.secsTo(QDateTime::currentDateTime());
+ QVERIFY2(qAbs(dt) < 5, QByteArray::number(dt).constData()); // it should not take more than 5 seconds for signal to arrive here
metadata = metadataSignal[2];
QCOMPARE(metadata[0].toInt(), id);