-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
47 lines (41 loc) · 1.28 KB
/
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
38
39
40
41
42
43
44
45
46
47
#include "src/TeamspeakBadgesViewer.h"
#include <QtWidgets/QApplication>
#include <QtNetwork/qsslsocket.h>
#include <QMessageBox>
#include "src/sqlite/Sql.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qDebug() << QSslSocket::sslLibraryBuildVersionString();
qDebug() << QSslSocket::supportsSsl();
qDebug() << QSslSocket::sslLibraryVersionString();
// check if ssl dll is missing
if (!QSslSocket::supportsSsl()) {
QMessageBox messageBox(
QMessageBox::Critical,
"Missing Dll",
"Missing some dll,\ninstall from https://www.microsoft.com/en-us/download/details.aspx?id=13523",
QMessageBox::Ok
);
messageBox.setFixedSize(500, 200);
messageBox.exec();
return 1;
}
QStringList _t = QSqlDatabase::drivers();
qDebug() << _t;
// check if SQL driver is missing
if (!_t.contains("QSQLITE")) {
QMessageBox messageBox(
QMessageBox::Critical,
"Missing QSQLITE driver",
"Missing QSQLITE driver,\nThis should not appear",
QMessageBox::Ok
);
messageBox.setFixedSize(500, 200);
messageBox.exec();
return 1;
}
// start app
TeamspeakBadgesViewer w;
return a.exec();
}