aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-26 01:00:13 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-26 01:00:13 +0200
commit257319079562368b6ee731f54e3f69647c3417b7 (patch)
tree231137a8fecdf1405eedb631bc3008a630cf9e16 /src/qml
parent7ecc96305f5ec0ed093e2e1b182cb85b71609bcd (diff)
parentaa3d088e3dbc6e93620310cf8de0782fbb2b2ee8 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/images/cpp-qml-integration-flowchart.odgbin15028 -> 15311 bytes
-rw-r--r--src/qml/doc/images/cpp-qml-integration-flowchart.pngbin80498 -> 64865 bytes
-rw-r--r--src/qml/qml/qqmlscriptblob.cpp4
-rw-r--r--src/qml/qml/qqmltypedata.cpp8
-rw-r--r--src/qml/qml/qqmltypeloader.cpp9
-rw-r--r--src/qml/qml/qqmltypeloader_p.h4
6 files changed, 7 insertions, 18 deletions
diff --git a/src/qml/doc/images/cpp-qml-integration-flowchart.odg b/src/qml/doc/images/cpp-qml-integration-flowchart.odg
index f24021635e..026f89fd73 100644
--- a/src/qml/doc/images/cpp-qml-integration-flowchart.odg
+++ b/src/qml/doc/images/cpp-qml-integration-flowchart.odg
Binary files differ
diff --git a/src/qml/doc/images/cpp-qml-integration-flowchart.png b/src/qml/doc/images/cpp-qml-integration-flowchart.png
index 3649ff9e41..97f075f51e 100644
--- a/src/qml/doc/images/cpp-qml-integration-flowchart.png
+++ b/src/qml/doc/images/cpp-qml-integration-flowchart.png
Binary files differ
diff --git a/src/qml/qml/qqmlscriptblob.cpp b/src/qml/qml/qqmlscriptblob.cpp
index 6ac30d3ab5..eb103dc434 100644
--- a/src/qml/qml/qqmlscriptblob.cpp
+++ b/src/qml/qml/qqmlscriptblob.cpp
@@ -68,7 +68,7 @@ QQmlRefPointer<QQmlScriptData> QQmlScriptBlob::scriptData() const
void QQmlScriptBlob::dataReceived(const SourceCodeData &data)
{
- if (!diskCacheDisabled() || diskCacheForced()) {
+ if (diskCacheEnabled()) {
QQmlRefPointer<QV4::ExecutableCompilationUnit> unit
= QV4::ExecutableCompilationUnit::create();
QString error;
@@ -132,7 +132,7 @@ void QQmlScriptBlob::dataReceived(const SourceCodeData &data)
auto executableUnit = QV4::ExecutableCompilationUnit::create(std::move(unit));
- if ((!diskCacheDisabled() || diskCacheForced()) && !isDebugging()) {
+ if (diskCacheEnabled()) {
QString errorString;
if (executableUnit->saveToDisk(url(), &errorString)) {
QString error;
diff --git a/src/qml/qml/qqmltypedata.cpp b/src/qml/qml/qqmltypedata.cpp
index fac96a2d02..22587c226a 100644
--- a/src/qml/qml/qqmltypedata.cpp
+++ b/src/qml/qml/qqmltypedata.cpp
@@ -112,10 +112,7 @@ QQmlMetaType::CompositeMetaTypeIds QQmlTypeData::typeIds() const
bool QQmlTypeData::tryLoadFromDiskCache()
{
- if (diskCacheDisabled() && !diskCacheForced())
- return false;
-
- if (isDebugging())
+ if (!diskCacheEnabled())
return false;
QV4::ExecutionEngine *v4 = typeLoader()->engine()->handle();
@@ -634,8 +631,7 @@ void QQmlTypeData::compile(const QQmlRefPointer<QQmlTypeNameCache> &typeNameCach
return;
}
- const bool trySaveToDisk = (!diskCacheDisabled() || diskCacheForced())
- && !m_document->jsModule.debugMode && !typeRecompilation;
+ const bool trySaveToDisk = diskCacheEnabled() && !typeRecompilation;
if (trySaveToDisk) {
QString errorString;
if (m_compiledData->saveToDisk(url(), &errorString)) {
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 997490361c..c2870396b0 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -707,14 +707,9 @@ bool QQmlTypeLoader::Blob::isDebugging() const
return typeLoader()->engine()->handle()->debugger() != nullptr;
}
-bool QQmlTypeLoader::Blob::diskCacheDisabled()
+bool QQmlTypeLoader::Blob::diskCacheEnabled() const
{
- return disableDiskCache();
-}
-
-bool QQmlTypeLoader::Blob::diskCacheForced()
-{
- return forceDiskCache();
+ return (!disableDiskCache() || forceDiskCache()) && !isDebugging();
}
bool QQmlTypeLoader::Blob::qmldirDataAvailable(const QQmlRefPointer<QQmlQmldirData> &data, QList<QQmlError> *errors)
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h
index d45f0e095c..adecf61896 100644
--- a/src/qml/qml/qqmltypeloader_p.h
+++ b/src/qml/qml/qqmltypeloader_p.h
@@ -129,9 +129,7 @@ public:
virtual QString stringAt(int) const { return QString(); }
bool isDebugging() const;
-
- static bool diskCacheDisabled();
- static bool diskCacheForced();
+ bool diskCacheEnabled() const;
QQmlImports m_importCache;
QVector<PendingImportPtr> m_unresolvedImports;