diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 17:40:44 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:20:10 +0100 |
commit | d0d2343b0d296e6998fdfc8420ae3f9317fdfd69 (patch) | |
tree | 5a75929a5af354568ec0ec48df73621401885eda /qfunctionconfigurator | |
parent | 6cdd799006fb87f0ab7fd670c5812c60de29aab5 (diff) |
nix copy-pasted QSettings usage
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 9 |
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(); |