Skip to content

Commit

Permalink
fix: stop logging errors about WebEngine and user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed May 12, 2024
1 parent bd3ed12 commit ec702e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/src/models/site.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ void Site::loadConfig()
m_userAgent = m_settings->value("Headers/User-Agent").toString();
if (m_userAgent.isEmpty()) {
const QString globalUserAgent = pSettings->value("userAgent", QStringLiteral("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0")).toString();
if (pSettings->value("useQtUserAgent", true).toBool()) {
#if defined(USE_WEBENGINE)
const bool defaultUseQtUserAgent = true;
#else
const bool defaultUseQtUserAgent = false;
#endif
if (pSettings->value("useQtUserAgent", defaultUseQtUserAgent).toBool()) {
#if defined(USE_WEBENGINE)
m_userAgent = QWebEngineProfile::defaultProfile()->httpUserAgent();
#else
Expand Down

0 comments on commit ec702e7

Please # to comment.