mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-30 09:05:04 +01:00
StandardPaths: Fix namespace
This commit is contained in:
parent
038e679000
commit
c80e7071a1
@ -43,8 +43,8 @@ QString StandardPaths::WritableLocation(const StandardLocation type) {
|
|||||||
|
|
||||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CacheLocation:
|
case StandardLocation::CacheLocation:
|
||||||
case GenericCacheLocation:{
|
case StandardLocation::GenericCacheLocation:{
|
||||||
QString cache_location = qEnvironmentVariable("XDG_CACHE_HOME");
|
QString cache_location = qEnvironmentVariable("XDG_CACHE_HOME");
|
||||||
if (!cache_location.startsWith(u'/')) {
|
if (!cache_location.startsWith(u'/')) {
|
||||||
cache_location.clear();
|
cache_location.clear();
|
||||||
@ -57,9 +57,9 @@ QString StandardPaths::WritableLocation(const StandardLocation type) {
|
|||||||
}
|
}
|
||||||
return cache_location;
|
return cache_location;
|
||||||
}
|
}
|
||||||
case AppDataLocation:
|
case StandardLocation::AppDataLocation:
|
||||||
case AppLocalDataLocation:
|
case StandardLocation::AppLocalDataLocation:
|
||||||
case GenericDataLocation:{
|
case StandardLocation::GenericDataLocation:{
|
||||||
QString data_location = qEnvironmentVariable("XDG_DATA_HOME");
|
QString data_location = qEnvironmentVariable("XDG_DATA_HOME");
|
||||||
if (!data_location.startsWith(u'/')) {
|
if (!data_location.startsWith(u'/')) {
|
||||||
data_location.clear();
|
data_location.clear();
|
||||||
@ -67,7 +67,7 @@ QString StandardPaths::WritableLocation(const StandardLocation type) {
|
|||||||
if (data_location.isEmpty()) {
|
if (data_location.isEmpty()) {
|
||||||
data_location = QDir::homePath() + "/.local/share"_L1;
|
data_location = QDir::homePath() + "/.local/share"_L1;
|
||||||
}
|
}
|
||||||
if (type == AppDataLocation || type == AppLocalDataLocation) {
|
if (type == StandardLocation::AppDataLocation || type == StandardLocation::AppLocalDataLocation) {
|
||||||
AppendOrganizationAndApplication(data_location);
|
AppendOrganizationAndApplication(data_location);
|
||||||
}
|
}
|
||||||
return data_location;
|
return data_location;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user