From f2506a2141d478ef677b12675a28130ba3ca90e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dutkiewicz?= Date: Thu, 18 Apr 2024 22:30:08 +0200 Subject: [PATCH] [QtWebEngine] Point to dictionaries storage path, references #1764 --- src/modules/backends/web/qtwebengine/QtWebEngineWebBackend.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/backends/web/qtwebengine/QtWebEngineWebBackend.cpp b/src/modules/backends/web/qtwebengine/QtWebEngineWebBackend.cpp index d632d0a4c..fac7107d0 100644 --- a/src/modules/backends/web/qtwebengine/QtWebEngineWebBackend.cpp +++ b/src/modules/backends/web/qtwebengine/QtWebEngineWebBackend.cpp @@ -27,6 +27,7 @@ #include "../../../../core/NetworkManagerFactory.h" #include "../../../../core/NotificationsManager.h" #include "../../../../core/SettingsManager.h" +#include "../../../../core/SpellCheckManager.h" #include "../../../../core/TransfersManager.h" #include "../../../../core/Utils.h" #include "../../../../ui/TransferDialog.h" @@ -52,6 +53,8 @@ QtWebEngineWebBackend::QtWebEngineWebBackend(QObject *parent) : WebBackend(paren m_engineVersion = QRegularExpression(QLatin1String("Chrome/([\\d\\.]+)")).match(userAgent).captured(1); m_userAgentComponents = {{QLatin1String("platform"), QRegularExpression(QLatin1String(R"((\([^\)]+\)))")).match(userAgent).captured(1)}, {QLatin1String("engineVersion"), QLatin1String("AppleWebKit/537.36 (KHTML, like Gecko) Chrome/") + m_engineVersion}, {QLatin1String("applicationVersion"), QCoreApplication::applicationName() + QLatin1Char('/') + QCoreApplication::applicationVersion()}}; + + qputenv("QTWEBENGINE_DICTIONARIES_PATH", SpellCheckManager::getDictionariesPath().toLatin1()); } void QtWebEngineWebBackend::handleDownloadRequested(QWebEngineDownloadItem *item)