Revert early initialisation of the web engine

This commit is contained in:
Michael Zanetti 2022-06-30 23:34:25 +02:00
parent 9610409d1f
commit de213320e3

View File

@ -37,10 +37,6 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
#if !defined Q_OS_ANDROID && !defined Q_OS_IOS && !defined UBPORTS
#include <QtWebView>
#endif
#include "libnymea-app-core.h"
#include "stylecontroller.h"
@ -69,9 +65,6 @@ int main(int argc, char *argv[])
#ifdef Q_OS_OSX
qputenv("QT_WEBVIEW_PLUGIN", "native");
#elif !defined Q_OS_ANDROID && !defined Q_OS_IOS && !defined UBPORTS
// FIXME: Platformhelper should be split into parts that shall run before initialisation and parts that require a UI context already running
QtWebView::initialize();
#endif
// qt.qml.connections warnings are disabled since the replace only exists
@ -102,6 +95,9 @@ int main(int argc, char *argv[])
parser.addOption(splashOption);
parser.process(application);
// Initialize app log controller as early as possible, but after setting app name and printing initial startup info
AppLogController::instance();
qCInfo(dcApplication()) << "*** nymea:app starting ***" << QDateTime::currentDateTime().toString();
QTranslator qtTranslator;
@ -111,9 +107,6 @@ int main(int argc, char *argv[])
qCInfo(dcApplication()) << application.applicationName() << APP_VERSION << "running on" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion() << PlatformHelper::instance()->deviceManufacturer() << PlatformHelper::instance()->deviceModel();
qCInfo(dcApplication()) << "Locale info:" << QLocale() << QLocale().name() << QLocale().language() << QLocale().system();
// Initialize app log controller as early as possible, but after setting app name and printing initial startup info
AppLogController::instance();
QTranslator appTranslator;
bool translationResult = appTranslator.load("nymea-app-" + QLocale().name(), ":/translations/");
if (translationResult) {