diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-09 12:04:52 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-10 12:22:30 +0100 |
commit | c0b59369ab45a78e4407633365a52c1a9255512c (patch) | |
tree | f3c94857667de0d58f83d5827789bc35f7756a3e /src/qml/jsruntime/qv4script.cpp | |
parent | c1c4a874e31ba108a3600fbbb0aee7fc0bf34601 (diff) |
Respect QML_DISABLE_DISK_CACHE also for caches built into the binary
Previously it would only disable loading of separate cache files.
Change-Id: Iae92fc03d2e5566ef7dc44a6730b788b7512fd3d
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 10250f6adc..b6469ffd77 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -227,7 +227,9 @@ Script *Script::createFromFileOrCache(ExecutionEngine *engine, QmlContext *qmlCo error->clear(); QQmlMetaType::CachedUnitLookupError cacheError = QQmlMetaType::CachedUnitLookupError::NoError; - if (const QQmlPrivate::CachedQmlUnit *cachedUnit = QQmlMetaType::findCachedCompilationUnit(originalUrl, &cacheError)) { + if (const QQmlPrivate::CachedQmlUnit *cachedUnit = engine->diskCacheEnabled() + ? QQmlMetaType::findCachedCompilationUnit(originalUrl, &cacheError) + : nullptr) { QQmlRefPointer<QV4::ExecutableCompilationUnit> jsUnit = QV4::ExecutableCompilationUnit::create( QV4::CompiledData::CompilationUnit(cachedUnit->qmlData, cachedUnit->aotCompiledFunctions)); |