-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
37 lines (31 loc) · 705 Bytes
/
main.cpp
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
31
32
33
34
35
36
37
#include <QtGui/QApplication>
#include <iostream>
#include <QDir>
#include <QFileInfo>
#include "dialog.h"
#include "config.h"
#include "console.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog w;
QString fusInvCfgPath;
if (qApp->arguments().count()>1) {
fusInvCfgPath = qApp->arguments().at(1);
}
Config c(fusInvCfgPath);
if ( ! c.settings ) {
return 1;
}
if (qApp->arguments().count()>2) {
QString fusInvPath = qApp->arguments().at(2);
#ifdef Q_OS_WIN32
c.set("agent-win", fusInvPath);
#else
c.set("agent-unix", fusInvPath);
#endif
}
w.loadConfig(&c);
w.show();
return a.exec();
}