-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (27 loc) · 872 Bytes
/
main.cpp
File metadata and controls
35 lines (27 loc) · 872 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
27
28
29
30
31
32
33
34
35
#define _ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH
#include <Windows.h>
#include <QApplication>
#include <QComboBox>
#include <QLocale>
#include <QTranslator>
#include "singleapplication.h"
#include "ui/mainwindow.h"
int main(int argc, char *argv[]) {
// make sure only 1 instance of the app is running
// (https://github.com/itay-grudev/SingleApplication)
SingleApplication a(argc, argv);
spdlog::flush_on(spdlog::level::info);
//spdlog::flush_every(std::chrono::seconds(5));
QTranslator translator;
const QStringList uiLanguages = QLocale::system().uiLanguages();
for (const QString &locale : uiLanguages) {
const QString baseName = "ReVox_" + QLocale(locale).name();
if (translator.load(":/i18n/" + baseName)) {
a.installTranslator(&translator);
break;
}
}
MainWindow w;
w.keyboardListener->Start();
return a.exec();
}