-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.cpp
46 lines (39 loc) · 1.18 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
/*****************************************************************************
* tunnelmanager - Simple GUI for SSH Tunnels
*
* Copyright (C) 2017-2024 Syping
* Copyright (C) 2017 Soner Sayakci
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
*****************************************************************************/
#include "TranslationClass.h"
#include "mainwindow.h"
#include "config.h"
#include <QApplication>
int main(int argc, char *argv[])
{
#if QT_VERSION < 0x060000
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#endif
QApplication a(argc, argv);
a.setApplicationName(TM_APPSTR);
a.setApplicationVersion(TM_APPVER);
#ifdef Q_OS_WIN
a.setFont(QApplication::font("QMenu"));
#endif
bool startHidden = false;
const QStringList args = a.arguments();
for (const QString &arg : args) {
if (arg == "--hidden")
startHidden = true;
}
TCIS->initUserLanguage();
TCIS->loadTranslation(&a);
MainWindow w;
if (!startHidden)
w.showNormal();
return a.exec();
}