mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 04:47:14 +02:00
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
By default the application will write user-specific configuration files
|
|
to current working directory. This patch changes the location to
|
|
~/.config/fxfloorboard-katana-mk2.
|
|
|
|
--- a/main.cpp
|
|
+++ b/main.cpp
|
|
@@ -34,7 +34,7 @@
|
|
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
|
QApplication app(argc, argv);
|
|
app.setOrganizationName("Gumtown");
|
|
- app.setApplicationName("Katana-MK2-FxFloorBoard");
|
|
+ app.setApplicationName("fxfloorboard-katana-mk2");
|
|
|
|
#ifdef Q_OS_ANDROID
|
|
//AndroidAskReadWriteRights(); // before creating the log file
|
|
@@ -55,6 +55,12 @@
|
|
QDir().setCurrent(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
|
|
//QDir().setCurrent("./Katana-MK2-FxFloorBoard");
|
|
#endif
|
|
+#ifdef Q_OS_LINUX
|
|
+ QString configLocation = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
|
+ QDir dir;
|
|
+ if (!dir.exists(configLocation)) { dir.mkpath(configLocation); }
|
|
+ dir.setCurrent(configLocation);
|
|
+#endif
|
|
|
|
Preferences *preferences = Preferences::Instance(); // Load the preferences.
|
|
QString lang = preferences->getPreferences("Language", "Locale", "select");
|