Verified Commit a6bc15b3 authored by Bruno Pitrus's avatar Bruno Pitrus
Browse files

Do not remove QtWebEngine/5.x.y from the default user agent to increase compatibility.

Many websites do not recognize the “Falkon” token and show a warning message
claiming the user is using an outdated version of Google Chrome, while they do
correctly recognize known Chromium forks as such.
An example showing this behavior is
parent 7534bde0
......@@ -28,7 +28,7 @@ UserAgentManager::UserAgentManager(QObject* parent)
, m_usePerDomainUserAgent(false)
m_defaultUserAgent = QWebEngineProfile::defaultProfile()->httpUserAgent();
m_defaultUserAgent.replace(QRegularExpression(QSL("QtWebEngine/[^\\s]+")), QSL("Falkon/%1").arg(Qz::VERSION));
m_defaultUserAgent.replace(QRegularExpression(QSL("(QtWebEngine/[^\\s]+)")), QSL("Falkon/%1 \\1").arg(Qz::VERSION));
void UserAgentManager::loadSettings()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment