-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
47 lines (37 loc) · 1.2 KB
/
main.cpp
File metadata and controls
47 lines (37 loc) · 1.2 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
#include "wizard.h"
#include <QApplication>
#include <QTranslator>
#include <QLibraryInfo>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//Translation
QTranslator qtTranslator;
bool bsuc = false;
bsuc = qtTranslator.load( QLocale(), QLatin1String("qt"), QLatin1String("_"),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
//surpress warning!
if (bsuc == false ) {
//I'm happy for yu
}
//surpress warning!
a.installTranslator(&qtTranslator);
QTranslator myappTranslator;
bsuc = myappTranslator.load(QLocale(), QLatin1String("HNEWizard"), QLatin1String("_"),
"/usr/share/HikNetExtractor/translations");
//surpress warning!
if (bsuc == false ) {
//I'm happy for yu
}
//surpress warning!
#if (defined(_WIN32))
bsuc = myappTranslator.load(QLocale(), QLatin1String("HikNetExtractor"), QLatin1String("_"),
QCoreApplication::applicationDirPath());
#endif
a.installTranslator(&myappTranslator);
//End Translation
Wizard w;
w.show();
qputenv("QT_ASSUME_STDERR_HAS_CONSOLE", "1");
return a.exec();
}