summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-05-20 19:53:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-05-20 19:53:43 +0200
commit296c95ebe47b99d0127dd5131f0e3db18d434dd7 (patch)
treef396aee64a14b4f99c503dfa0c21f5cdc19021ca /facetracknoir/main.cpp
parente05f9e949faea2d03d39829c709a410ea0f8813f (diff)
main: simplify #161
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r--facetracknoir/main.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index bbdfbc70..398f293a 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -1,4 +1,6 @@
#include "ui.h"
+#include "opentrack/options.hpp"
+using namespace options;
#include <QApplication>
#include <QCommandLineParser>
#include <QStyleFactory>
@@ -36,13 +38,17 @@ int main(int argc, char** argv)
p.addOption(autostartOption);
p.process(app);
- MainWindow w;
-
QString profile = p.value(autostartOption);
- if (! profile.isEmpty() )
+ if (!profile.isEmpty())
{
- w.open_and_run(profile);
+ QSettings settings(group::org);
+ settings.setValue(group::filename_key, MainWindow::remove_app_path(profile));
}
+
+ MainWindow w;
+
+ if (!profile.isEmpty())
+ w.startTracker();
w.show();
app.exec();