-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (25 loc) · 698 Bytes
/
main.cpp
File metadata and controls
26 lines (25 loc) · 698 Bytes
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
#include<QCoreApplication>
#include"Screw/CmdIss.h"
#include"Shell/Shell.h"
#include"PluginsManager/PluginsManager.h"
#include<iostream>
#include<QThread>
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
QThread thread(&a);
Shell::getObject(&a);
CmdIss::getObject(&thread);
PluginsManager::getObject(&thread);
QObject::connect(CmdIss::getObject(), &CmdIss::appExit, [&]() {
thread.exit();
QCoreApplication::exit();
});
thread.start();
int ret = QCoreApplication::exec();
thread.wait();
PluginsManager::deleteObject();
CmdIss::deleteObject();
Shell::deleteObject();
std::cout << std::endl;
return ret;
}