From de213320e34df8af5b24008aa84d0e95ddecb604 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 30 Jun 2022 23:34:25 +0200 Subject: [PATCH] Revert early initialisation of the web engine --- nymea-app/main.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/nymea-app/main.cpp b/nymea-app/main.cpp index a8fda242..c4ee8a71 100644 --- a/nymea-app/main.cpp +++ b/nymea-app/main.cpp @@ -37,10 +37,6 @@ #include #include -#if !defined Q_OS_ANDROID && !defined Q_OS_IOS && !defined UBPORTS -#include -#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) {