summaryrefslogtreecommitdiffstats
path: root/src/client/main.cpp
blob: 6a7c2a093682865f4a10c5960275e11642906d08 (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
28
29
30
#include "toolbar/toolbar.h"
#include "clientapp/clientapp.h"
#include "util/util.h"

// Remove when we don't support Ubuntu 20.04 anymore
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
#define endl Qt::endl
#endif

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

	ClientApp app(argc, argv);

	/* here we handle the arguments that were not handled by ClientApp */
	for (const auto &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 ClientApp::exec();
}