linphone-desktop/Linphone/main.cpp
Julien Wadel b6ff625370 Add Single Application.
Add command parser and output modes (--verbose --qt-logs-only).
Move static Logger to core as it is used from Qt and dispatch logs to the SDK thread.
Update SDK to allow builds from MSVC 2022.
2023-10-09 17:19:33 +02:00

24 lines
533 B
C++

#include <QApplication>
#include <QQmlApplicationEngine>
#include <QLocale>
#include <QTranslator>
#include "core/App.hpp"
int main(int argc, char *argv[]) {
App app(argc, argv);
QTranslator translator;
const QStringList uiLanguages = QLocale::system().uiLanguages();
for (const QString &locale : uiLanguages) {
const QString baseName = "Linphone_" + QLocale(locale).name();
if (translator.load(":/i18n/" + baseName)) {
app.installTranslator(&translator);
break;
}
}
int result = app.exec();
return result;
}