summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp')
-rw-r--r--ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp b/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp
index 80543e7a..0a4454e4 100644
--- a/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp
+++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat_settings.cpp
@@ -35,15 +35,11 @@
void TrackerSettings::load_ini()
{
-#ifdef OPENTRACK_API
+#ifndef OPENTRACK_API
QSettings settings(OPENTRACK_ORG); // Registry settings (in HK_USER)
+ QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
#else
- QSettings settings("opentrack"); // Registry settings (in HK_USER)
-#endif
-#ifdef OPENTRACK_API
- QString currentFile = settings.value( OPENTRACK_CONFIG_FILENAME_KEY, QCoreApplication::applicationDirPath() + OPENTRACK_DEFAULT_CONFIG_PATH ).toString();
-#else
- QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QString currentFile = options::group::ini_pathname();
#endif
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
@@ -101,19 +97,14 @@ void TrackerSettings::load_ini()
iniFile.endGroup();
}
-
void TrackerSettings::save_ini() const
{
-#ifdef OPENTRACK_API
+#ifndef OPENTRACK_API
QSettings settings(OPENTRACK_ORG); // Registry settings (in HK_USER)
+ QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
#else
- QSettings settings("opentrack"); // Registry settings (in HK_USER)
-#endif
-#ifdef OPENTRACK_API
- QString currentFile = settings.value( OPENTRACK_CONFIG_FILENAME_KEY, QCoreApplication::applicationDirPath() + OPENTRACK_DEFAULT_CONFIG_PATH ).toString();
-#else
- QString currentFile = settings.value( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ QString currentFile = options::group::ini_pathname();
#endif
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)