diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-06-08 13:48:59 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-06-09 15:23:13 +0000 |
commit | 939f07695b853a4da2e237c5f1c3d50e34f9c45c (patch) | |
tree | 175bcb4aec5bee081127cb4f44ee06f7dac36d94 | |
parent | 5efbd7165d6867aa376f23c20edcfe49e80518c6 (diff) |
Use pre-generated QML caches even if they are not writable
For example, if they are installed into system paths.
Change-Id: Id14ccfbe57c5bcf273c79510034dc20400073451
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index ac4192bc12..485a5e6fb7 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -82,7 +82,7 @@ static QString cacheFilePath(const QUrl &url) { const QString localSourcePath = QQmlFile::urlToLocalFileOrQrc(url); const QString localCachePath = localSourcePath + QLatin1Char('c'); - if (QFileInfo(QFileInfo(localSourcePath).dir().absolutePath()).isWritable()) + if (QFile::exists(localCachePath) || QFileInfo(QFileInfo(localSourcePath).dir().absolutePath()).isWritable()) return localCachePath; QCryptographicHash fileNameHash(QCryptographicHash::Sha1); fileNameHash.addData(localSourcePath.toUtf8()); |