From 8d1bae4c0f45ea6853d5ff63fda4f625f1e4bb83 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 3 Aug 2016 13:50:44 +0200 Subject: Enable QML/JS disk cache by default Except on Windows, where there is still one bug to fix. Change-Id: I1a22f42859733eedd37596a3e8fc09680720ff10 Reviewed-by: Erik Verbruggen --- tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/qml/qqmlengine') diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index 74e54b64e9..9c155eda5b 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -275,6 +275,12 @@ void tst_qqmlengine::clearComponentCache() // Modify qml file { + // On macOS with HFS+ the precision of file times is measured in seconds, so to ensure that + // the newly written file has a modification date newer than an existing cache file, we must + // wait. + // Similar effects of lacking precision have been observed on some Linux systems. + QThread::sleep(1); + QFile file("temp.qml"); QVERIFY(file.open(QIODevice::WriteOnly)); file.write("import QtQuick 2.0\nQtObject {\nproperty int test: 11\n}\n"); -- cgit v1.2.3