Remove manual qmlcachegen invocation for internal Qt QML files
It's not safe to always assume we can always precompile everything. Instead set QML_CACHE_DIR to ensure the files go to our desired location.
This commit is contained in:
parent
87eba9bb89
commit
80062d262e
4 changed files with 16 additions and 9 deletions
|
|
@ -9,6 +9,7 @@
|
|||
QString Path::s_CacheDir;
|
||||
QString Path::s_LogDir;
|
||||
QString Path::s_BoxArtCacheDir;
|
||||
QString Path::s_QmlCacheDir;
|
||||
|
||||
QString Path::getLogDir()
|
||||
{
|
||||
|
|
@ -22,6 +23,12 @@ QString Path::getBoxArtCacheDir()
|
|||
return s_BoxArtCacheDir;
|
||||
}
|
||||
|
||||
QString Path::getQmlCacheDir()
|
||||
{
|
||||
Q_ASSERT(!s_QmlCacheDir.isEmpty());
|
||||
return s_QmlCacheDir;
|
||||
}
|
||||
|
||||
QByteArray Path::readDataFile(QString fileName)
|
||||
{
|
||||
QFile dataFile(getDataFilePath(fileName));
|
||||
|
|
@ -97,6 +104,7 @@ void Path::initialize(bool portable)
|
|||
if (portable) {
|
||||
s_LogDir = QDir::currentPath();
|
||||
s_BoxArtCacheDir = QDir::currentPath() + "/boxart";
|
||||
s_QmlCacheDir = QDir::currentPath() + "/qmlcache";
|
||||
|
||||
// In order for the If-Modified-Since logic to work in MappingFetcher,
|
||||
// the cache directory must be different than the current directory.
|
||||
|
|
@ -112,5 +120,6 @@ void Path::initialize(bool portable)
|
|||
#endif
|
||||
s_CacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
|
||||
s_BoxArtCacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/boxart";
|
||||
s_QmlCacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/qmlcache";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue