-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
executable file
·35 lines (27 loc) · 982 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
#include <QApplication>
#include "MainWindow.h"
#include "UsbThread.h"
#include "Metatypes.h"
#include "DeviceInterfacesModel.h"
int main(int argc, char *argv[])
{
qRegisterMetaType<DeviceInfo>();
qRegisterMetaType<DeviceDescriptor>();
qRegisterMetaType<DeviceId>();
qRegisterMetaType<Device::Recipient>();
qRegisterMetaType<Device::Type>();
qRegisterMetaType<QVector<DeviceInfo>>();
qRegisterMetaType<DeviceInterfacesModel::TreeNodeData>();
qRegisterMetaType<DeviceInterfacesModel::NodeType>();
QCoreApplication::setOrganizationName("UsbTool");
QCoreApplication::setOrganizationDomain("example.com");
QCoreApplication::setApplicationName("UsbTool");
QApplication a(argc, argv);
// UsbThread uses its own Qt event loop so it requires QApplication
// to have been initialised already. When this is destroyed it will block
// until any outstanding operations are complete. Mabe.
UsbThread usbThread;
MainWindow w(usbThread);
w.show();
return a.exec();
}