diff options
Diffstat (limited to 'src/server/main.cpp')
-rw-r--r-- | src/server/main.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp index f804c1a..7ae0466 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -1,28 +1,27 @@ -#include <iostream> -#include <stdlib.h> -#include "mainwindow/mainwindow.h" #include "serverapp/serverapp.h" -using std::cout; -using std::endl; +#include <QDebug> void usage() { - cout << "USAGE pvsmgr [OPTIONS]" << endl; - cout << "OPTIONS: " << endl; - cout << "--manager-only" << endl; - cout << " pvsmgr terminates if this computer is not a manager of a room" << endl; - cout << "--config=INIFILE" << endl; - cout << " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) " << endl; - cout << "--usage" << endl; - cout << " shows this message" << endl; + puts( + "USAGE pvsmgr [OPTIONS]\n" + "OPTIONS: \n" + "--manager-only\n" + " pvsmgr terminates if this computer is not a manager of a room\n" + "--config=INIFILE\n" + " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) \n" + "--usage\n" + " shows this message\n" + ); } int main(int argc, char** argv) { - qsrand(uint(QDateTime::currentMSecsSinceEpoch())); ServerApp app(argc, argv); + if (app.shouldExit()) + return 0; for (QString a : app.arguments()) { if (a == "--usage" || a == "--help") { |