Skip to content

Commit

Permalink
Use only cache path to cache .qmlc files on Android
Browse files Browse the repository at this point in the history
Task-number: QTBUG-58223
Change-Id: Ibc599ac2e62aa60405af0022c7f5bab6eac3e3c4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit ff08272245c099cadd433c8b5d4f98301f5e585b)
  • Loading branch information
bog-dan-ro committed Feb 13, 2018
1 parent fc333db commit 8342f0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qml/compiler/qv4compileddata.cpp
Expand Up @@ -84,8 +84,10 @@ static QString cacheFilePath(const QUrl &url)
{
const QString localSourcePath = QQmlFile::urlToLocalFileOrQrc(url);
const QString localCachePath = localSourcePath + QLatin1Char('c');
#ifndef Q_OS_ANDROID
if (QFile::exists(localCachePath) || QFileInfo(QFileInfo(localSourcePath).dir().absolutePath()).isWritable())
return localCachePath;
#endif
QCryptographicHash fileNameHash(QCryptographicHash::Sha1);
fileNameHash.addData(localSourcePath.toUtf8());
QString directory = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1String("/qmlcache/");
Expand Down

0 comments on commit 8342f0b

Please sign in to comment.