diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-07 06:39:57 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-07 06:39:57 +0200 |
commit | 03ba7a0bc6bc2465c6487d38b70c33e3690584be (patch) | |
tree | d1bc7e926fb72a339afa8cfa7f466d83e0a425ba /facetracknoir/main.cpp | |
parent | f4b1e06604c74bb56a88c7e9284c77ffbd1acc78 (diff) |
remove --autostart option
Author said he no longer needs it.
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r-- | facetracknoir/main.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 6d29e3b5..326b40ec 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -60,34 +60,14 @@ int main(int argc, char** argv) QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); - QCommandLineParser p; - p.setApplicationDescription("opentrack - Head tracking software for MS Windows, Linux, and Apple OSX"); - p.addHelpOption(); - QCommandLineOption autostartOption(QStringList() << "a" << "autostart", "Load <profile> and start tracking", "profile"); - p.addOption(autostartOption); - p.process(app); - - QString profile = p.value(autostartOption); - - bool use_profile = profile.endsWith(".ini") && QFileInfo(profile).exists() && QFileInfo(profile).isFile(); - if (!profile.isEmpty() && !use_profile) - QMessageBox::warning(nullptr, "Can't load profile", "Profile " + profile + " specified but can't be opened!", - QMessageBox::Ok, QMessageBox::NoButton); - - if (use_profile) - MainWindow::set_profile(profile); - auto w = std::make_shared<MainWindow>(); - - if (use_profile) - w->startTracker(); - + w->show(); app.exec(); - // on MSVC crashes in atexit + // on MSVC crashes in atexit #ifdef _MSC_VER - TerminateProcess(GetCurrentProcess(), 0); + TerminateProcess(GetCurrentProcess(), 0); #endif return 0; } |