mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-10 05:34:17 +00:00
80062d262e
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.
28 lines
706 B
C++
28 lines
706 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
#include <QFileInfo>
|
|
|
|
class Path
|
|
{
|
|
public:
|
|
static QString getLogDir();
|
|
static QString getBoxArtCacheDir();
|
|
static QString getQmlCacheDir();
|
|
|
|
static QByteArray readDataFile(QString fileName);
|
|
static void writeCacheFile(QString fileName, QByteArray data);
|
|
static void deleteCacheFile(QString fileName);
|
|
static QFileInfo getCacheFileInfo(QString fileName);
|
|
|
|
// Only safe to use directly for Qt classes
|
|
static QString getDataFilePath(QString fileName);
|
|
|
|
static void initialize(bool portable);
|
|
|
|
private:
|
|
static QString s_CacheDir;
|
|
static QString s_LogDir;
|
|
static QString s_BoxArtCacheDir;
|
|
static QString s_QmlCacheDir;
|
|
};
|