aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp')
-rw-r--r--tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
index f3ba3e8971..f19e82032a 100644
--- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
+++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
@@ -56,6 +56,7 @@ public slots:
}
private slots:
+ void initTestCase();
void basicProperties();
void showFiles();
void resetFiltering();
@@ -97,6 +98,15 @@ void tst_qquickfolderlistmodel::checkNoErrors(const QQmlComponent& component)
QVERIFY(!component.isError());
}
+void tst_qquickfolderlistmodel::initTestCase()
+{
+ // The tests rely on a fixed number of files in the directory with the qml files
+ // (the data dir), so disable the disk cache to avoid creating .qmlc files and
+ // confusing the test.
+ qputenv("QML_DISABLE_DISK_CACHE", "1");
+ QQmlDataTest::initTestCase();
+}
+
void tst_qquickfolderlistmodel::basicProperties()
{
QQmlComponent component(&engine, testFileUrl("basic.qml"));