Fix showing help when app is running

This commit is contained in:
Daniel Molkentin 2013-08-15 12:15:39 +02:00
parent 0e5bfc03ce
commit 7f7ebc36f5

View file

@ -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();
}