core/qmlglobal: expose dataDir and stateDir

This commit is contained in:
outfoxxed 2025-05-16 20:14:59 -07:00
parent 69c7f4fe77
commit c1c24c2998
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
4 changed files with 96 additions and 30 deletions

View file

@ -24,7 +24,6 @@ public:
checkLock(const QString& path, InstanceLockInfo* info = nullptr, bool allowDead = false);
static QVector<InstanceLockInfo> collectInstances(const QString& path, bool fallbackDead = false);
QDir* cacheDir();
QDir* baseRunDir();
QDir* shellRunDir();
QDir* instanceRunDir();
@ -32,6 +31,10 @@ public:
void linkPathDir();
void createLock();
QDir shellDataDir();
QDir shellStateDir();
QDir shellCacheDir();
private:
enum class DirState : quint8 {
Unknown = 0,
@ -41,12 +44,17 @@ private:
QString shellId;
QString pathId;
QDir mCacheDir;
QDir mBaseRunDir;
QDir mShellRunDir;
QDir mInstanceRunDir;
DirState cacheState = DirState::Unknown;
DirState baseRunState = DirState::Unknown;
DirState shellRunState = DirState::Unknown;
DirState instanceRunState = DirState::Unknown;
QDir mShellDataDir;
QDir mShellStateDir;
QDir mShellCacheDir;
DirState shellDataState = DirState::Unknown;
DirState shellStateState = DirState::Unknown;
DirState shellCacheState = DirState::Unknown;
};