aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-11-22 15:53:07 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-11-23 13:06:27 +0000
commiteb7ec4fb9492b51d8371d8689b9538d6d22d13fd (patch)
treef809e744c90e5dc53d6454b4927df43598da04d4 /src
parentd236661940b09194cc6a864ffbe687569922787e (diff)
Fix handling of qrc:/// urls with disk caching
Use the right function for converting a qrc:/// url to a local path. QUrl::toLocalFile() gives us an empty path, which prevents us from getting a time stamp and comparing it against the stamp in the cache file. This fixes disk caching with samegame. Change-Id: Id3eb270f1f7a7f25143d2f075a45f32bdb0384c5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index e815c41a86..f8668b48e4 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -397,7 +397,7 @@ bool CompilationUnit::loadFromDisk(const QUrl &url, EvalISelFactory *iselFactory
return false;
}
- const QString sourcePath = url.toLocalFile();
+ const QString sourcePath = QQmlFile::urlToLocalFileOrQrc(url);
QScopedPointer<CompilationUnitMapper> cacheFile(new CompilationUnitMapper());
CompiledData::Unit *mappedUnit = cacheFile->open(cacheFilePath(url), sourcePath, errorString);