aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-11-27 17:22:36 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-11-29 05:40:30 +0000
commite7d19a2a0fcbec38b7e132634d0ebe79b772c61b (patch)
treee2c4d69f210eb141f5245bdc22f2a4233516b737 /src/qml/qml
parent04af30c91a68a04ab1830d6ddc1bf470354b1862 (diff)
Fix stale QML cache files when using assets:// on Android
When the "source file system" cannot provide us with a reliable time stamp for a .qml file, do not try to save a cache file to disk. Otherwise we may end up with stale cache files that are loaded despite the source having changed. We used to fall back to the app binary time stamp, but that was needed before we correctly stored the time stamp of resources in the qrc data. Fixes: QTBUG-68736 Change-Id: I8c2f8939d253472ce8bc1e3a59e8142d21f07539 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Richard Weickelt <richard@weickelt.de>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmltypeloader.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index cb90af4cf0..9df502f778 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -3285,14 +3285,7 @@ QDateTime QQmlDataBlob::SourceCodeData::sourceTimeStamp() const
if (hasInlineSourceCode)
return QDateTime();
- QDateTime timeStamp = fileInfo.lastModified();
- if (timeStamp.isValid())
- return timeStamp;
-
- static QDateTime appTimeStamp;
- if (!appTimeStamp.isValid())
- appTimeStamp = QFileInfo(QCoreApplication::applicationFilePath()).lastModified();
- return appTimeStamp;
+ return fileInfo.lastModified();
}
bool QQmlDataBlob::SourceCodeData::exists() const