From 7f7ebc36f5764651a638cf1ecb3f9652f7a479c2 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 15 Aug 2013 12:15:39 +0200 Subject: [PATCH] Fix showing help when app is running --- src/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1f8ef82f8..a1ee1d6ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,7 +23,12 @@ int main(int argc, char **argv) Mirall::Application app(argc, argv); app.initialize(); - + + if( app.giveHelp() ) { + app.showHelp(); + return 0; + } + // if the application is already running, notify it. if( app.isRunning() ) { QStringList args = app.arguments(); @@ -43,11 +48,6 @@ int main(int argc, char **argv) .arg(Mirall::Theme::instance()->appNameGUI())); } } - // if help requested, show on command line and exit. - if( ! app.giveHelp() ) { - return app.exec(); - } else { - app.showHelp(); - } + return app.exec(); }