Verified Commit c8647306 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Some string optimizations

parent 26ebf2d1
......@@ -54,7 +54,7 @@ QString UrlUtils::urlHostPort(const QString &url)
QUrl u(url);
QString r = u.host();
int p = u.port(-1);
if (p > 0) r = QString("%1:%2").arg(r).arg(p);
if (p > 0) r = QStringLiteral("%1:%2").arg(r).arg(p);
return r;
}
......
......@@ -9,7 +9,7 @@ UserAgent::UserAgent(QObject *parent) : QObject(parent)
QString UserAgent::userAgent() const
{
return QString("Mozilla/5.0 (%1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/%2 "
return QStringLiteral("Mozilla/5.0 (%1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/%2 "
"Chrome/75.0.3770.116 %3 Safari/537.36")
.arg(m_isMobile ? QStringLiteral("Linux; Plasma Mobile, like Android 9.0")
: QStringLiteral("X11; Linux x86_64"))
......
Markdown is supported
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