mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-27 07:46:17 +01:00
new data paths for rssguard4
This commit is contained in:
parent
cf39461001
commit
2c64bb1569
@ -1,7 +1,7 @@
|
||||
APP_NAME = "RSS Guard"
|
||||
APP_LOW_NAME = "rssguard"
|
||||
APP_REVERSE_NAME = "com.github.rssguard"
|
||||
APP_LOW_H_NAME = ".rssguard4"
|
||||
APP_LOW_H_NAME = ".rssguard"
|
||||
APP_AUTHOR = "Martin Rotter"
|
||||
APP_COPYRIGHT = "(C) 2011-2021 $$APP_AUTHOR"
|
||||
APP_VERSION = "4.0.0"
|
||||
|
@ -254,13 +254,13 @@ void Application::setMainForm(FormMain* main_form) {
|
||||
}
|
||||
|
||||
QString Application::configFolder() const {
|
||||
return IOFactory::getSystemFolder(QStandardPaths::GenericConfigLocation);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::StandardLocation::GenericConfigLocation);
|
||||
}
|
||||
|
||||
QString Application::userDataAppFolder() const {
|
||||
// In "app" folder, we would like to separate all user data into own subfolder,
|
||||
// therefore stick to "data" folder in this mode.
|
||||
return applicationDirPath() + QDir::separator() + QSL("data");
|
||||
return applicationDirPath() + QDir::separator() + QSL("data4");
|
||||
}
|
||||
|
||||
QString Application::userDataFolder() {
|
||||
@ -276,34 +276,26 @@ QString Application::userDataFolder() {
|
||||
}
|
||||
|
||||
QString Application::userDataHomeFolder() const {
|
||||
// Fallback folder.
|
||||
const QString home_folder = homeFolder() + QDir::separator() + QSL(APP_LOW_H_NAME) + QDir::separator() + QSL("data");
|
||||
|
||||
if (QDir().exists(home_folder)) {
|
||||
return home_folder;
|
||||
}
|
||||
else {
|
||||
#if defined(Q_OS_ANDROID)
|
||||
return IOFactory::getSystemFolder(QStandardPaths::GenericDataLocation) + QDir::separator() + QSL(APP_NAME);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::GenericDataLocation) + QDir::separator() + QSL(APP_NAME) + QSL(" 4");
|
||||
#else
|
||||
return configFolder() + QDir::separator() + QSL(APP_NAME);
|
||||
return configFolder() + QDir::separator() + QSL(APP_NAME) + QSL(" 4");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
QString Application::tempFolder() const {
|
||||
return IOFactory::getSystemFolder(QStandardPaths::TempLocation);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::StandardLocation::TempLocation);
|
||||
}
|
||||
|
||||
QString Application::documentsFolder() const {
|
||||
return IOFactory::getSystemFolder(QStandardPaths::DocumentsLocation);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::StandardLocation::DocumentsLocation);
|
||||
}
|
||||
|
||||
QString Application::homeFolder() const {
|
||||
#if defined(Q_OS_ANDROID)
|
||||
return IOFactory::getSystemFolder(QStandardPaths::GenericDataLocation);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::StandardLocation::GenericDataLocation);
|
||||
#else
|
||||
return IOFactory::getSystemFolder(QStandardPaths::HomeLocation);
|
||||
return IOFactory::getSystemFolder(QStandardPaths::StandardLocation::HomeLocation);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user