-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
35 lines (27 loc) · 931 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
/*
* Copyright 2017
*
* Made by vincent leroy
* Mail <[email protected]>
*/
// Project includes ------------------------------------------------------------
#include "MainWindow.hpp"
#include "Constants.hpp"
// Qt includes -----------------------------------------------------------------
#include <QApplication>
#include <QFileInfo>
// C++ standard library includes -----------------------------------------------
#include <csignal>
int main(int ac, char * av[])
{
std::signal(SIGINT, [](int){ qApp->quit(); });
std::signal(SIGTERM, [](int){ qApp->quit(); });
QApplication app(ac, av);
QApplication::setOrganizationDomain("vivoka.com");
QApplication::setOrganizationName("vivoka");
QApplication::setApplicationName(QFileInfo(av[0]).baseName());
QApplication::setApplicationVersion(Constants::applicationVersion);
MainWindow w;
w.restoreState();
return app.exec();
}