Can use XDG dirs for ubuntu touch...
This commit is contained in:
committed by
craig.p.drummond
parent
8c25636ba3
commit
50cb994b82
@@ -663,9 +663,7 @@ static QString userDir(const QString &mainDir, const QString &sub, bool create)
|
||||
|
||||
QString Utils::configDir(const QString &sub, bool create)
|
||||
{
|
||||
#ifdef ENABLE_UBUNTU
|
||||
return userDir(QDir::homePath()+"/.local/share"+constDirSep+FOLDER_NAME+constDirSep+"config"+constDirSep, sub, create);
|
||||
#elif defined Q_OS_WIN
|
||||
#if defined Q_OS_WIN
|
||||
return userDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation)+constDirSep, sub, create);
|
||||
#else
|
||||
QString env = qgetenv("XDG_CONFIG_HOME");
|
||||
@@ -675,9 +673,7 @@ QString Utils::configDir(const QString &sub, bool create)
|
||||
|
||||
QString Utils::dataDir(const QString &sub, bool create)
|
||||
{
|
||||
#ifdef ENABLE_UBUNTU
|
||||
return userDir(QDir::homePath()+"/.local/share"+constDirSep+FOLDER_NAME+constDirSep, sub, create);
|
||||
#elif defined Q_OS_WIN
|
||||
#if defined Q_OS_WIN
|
||||
return userDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation)+constDirSep, sub, create);
|
||||
#else
|
||||
QString env = qgetenv("XDG_DATA_HOME");
|
||||
@@ -687,9 +683,7 @@ QString Utils::dataDir(const QString &sub, bool create)
|
||||
|
||||
QString Utils::cacheDir(const QString &sub, bool create)
|
||||
{
|
||||
#ifdef ENABLE_UBUNTU
|
||||
return userDir(QDir::homePath()+"/.local/share"+constDirSep+FOLDER_NAME+constDirSep+"cache"+constDirSep, sub, create);
|
||||
#elif defined Q_OS_WIN
|
||||
#if defined Q_OS_WIN
|
||||
return userDir(QDesktopServices::storageLocation(QDesktopServices::CacheLocation)+constDirSep, sub, create);
|
||||
#else
|
||||
QString env = qgetenv("XDG_CACHE_HOME");
|
||||
|
||||
Reference in New Issue
Block a user