summaryrefslogtreecommitdiffstats
path: root/src/client/main.cpp
blob: 61ca0e9d0c152d2139bffaeef015ed86824dd197 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "toolbar/toolbar.h"
#include "clientapp/clientapp.h"
#include "util/util.h"


/* instantiates the ClientApp, handles some extra parameters and starts the
 * main-loop of ClientApp */
int main(int argc, char** argv)
{

	ClientApp app(argc, argv);
	qsrand((uint)QDateTime::currentMSecsSinceEpoch());

	/* here we handle the arguments that were not handled by ClientApp */
	for (QString a : app.arguments()) {
		if (a == "--usage" || a == "--help") {
			qStdout() << "Usage: pvsclient [--exam-mode] [--auto|--session=xxx|\"\"]" << endl;
			exit(0);
		} else if (a.contains("pvsclient")) {
			/* do nothing */
		} else {
			qStdout() << "Unknown argument: " << a << endl;
			exit(1);
		}
	}
	return app.exec();
}