Skip to content

Commit

Permalink
[QtWebEngine] Point to dictionaries storage path, references #1764
Browse files Browse the repository at this point in the history
  • Loading branch information
Emdek committed Apr 18, 2024
1 parent a56478e commit f2506a2
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit f2506a2

Please sign in to comment.