-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
66 lines (52 loc) · 1.28 KB
/
main.cpp
File metadata and controls
66 lines (52 loc) · 1.28 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Qt includes
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QFile>
#include <QtDebug>
#include <QTextStream>
#include <QMutex>
#include <QDateTime>
#include <QStandardPaths>
#include <QDir>
#include <QLoggingCategory>
// Include the template framework
#include "iconsimageprovider.h"
#include "iconthemeimageprovider.h"
// Require app
#include "bootstrap/Startup.h"
// Debugger
#include "app/Services/Debugger.h"
// Debugging catergories
#include "app/Services/Debuging.h"
/**
* Main applcation function
*
* @brief qMain
* @param argc
* @param argv
* @return Qt application event loop
*/
int main(int argc, char *argv[])
{
// Set
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
// Start app
QApplication app(argc, argv);
// Install the debugger
if(App::Services::Debugger::getInstance().wasSuccess())
qInstallMessageHandler(App::Services::Debugger::handlerAccessor);
// Boot the applcation
Bootstrap::Startup loader;
// If successfull return event loop
if (loader.success())
{
// State app loaded
qInfo() << "Application loaded";
// Run event loop
return app.exec();
}
// Log error
qCritical() << "Application could not load!";
// End app
return -1;
}