summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-04 17:40:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-04 19:20:10 +0100
commitd0d2343b0d296e6998fdfc8420ae3f9317fdfd69 (patch)
tree5a75929a5af354568ec0ec48df73621401885eda /qfunctionconfigurator/qfunctionconfigurator.cpp
parent6cdd799006fb87f0ab7fd670c5812c60de29aab5 (diff)
nix copy-pasted QSettings usage
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.cpp')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index f1ed3001..b9728bd7 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -1,3 +1,5 @@
+#include "../opentrack/options.hpp"
+using namespace options;
#include "qfunctionconfigurator/qfunctionconfigurator.h"
#include <QPainter>
#include <QPaintEvent>
@@ -19,11 +21,8 @@ QFunctionConfigurator::QFunctionConfigurator(QWidget *parent) :
}
void QFunctionConfigurator::setConfig(Map* config, const QString& name) {
- QSettings settings("opentrack");
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat );
-
- config->loadSettings(iniFile, name);
+ mem<QSettings> iniFile = group::ini_file();
+ config->loadSettings(*iniFile, name);
_config = config;
_draw_function = true;
update_range();