From 03ba7a0bc6bc2465c6487d38b70c33e3690584be Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 7 Jul 2015 06:39:57 +0200 Subject: remove --autostart option Author said he no longer needs it. --- facetracknoir/main.cpp | 26 +++----------------------- 1 file 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 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(); - - 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; } -- cgit v1.2.3