summaryrefslogtreecommitdiffstats
path: root/wonkoclient/main.cpp
blob: eaf92c5d9192d9b0f86464bb5bba8df92366cc8a (plain)
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
//
// Created by robotbrain on 3/26/16.
//

#include "WonkoClient.h"
#include <QCoreApplication>
#include <QDebug>
#include <QtWidgets/QInputDialog>
#include <QtGui/QDesktopServices>
#include <QDir>

int main(int argc, char *argv[])
{
	QCoreApplication a(argc, argv);
	if (a.arguments().contains("-d"))
	{
		int i = a.arguments().lastIndexOf("-d") + 1;
		if (i < a.arguments().length())
		{
			QDir dir = QDir::current();
			dir.cd(a.arguments()[i]);
			QDir::setCurrent(dir.absolutePath());
			qDebug() << "Using " << dir.absolutePath();
		}
	}
	MMCC.initGlobalSettings();
	MMCC.registerLists();
	return a.exec();
}