mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-11 10:16:09 +00:00
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:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user