mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
refactor: replace QString constructors with QStringLiteral
This commit is contained in:
parent
9f2f1c62de
commit
c890aebf72
4 changed files with 9 additions and 9 deletions
|
@ -19,8 +19,8 @@ FallbackAuth::FallbackAuth(const QString &session, const QString &authType, QObj
|
||||||
void
|
void
|
||||||
FallbackAuth::openFallbackAuth()
|
FallbackAuth::openFallbackAuth()
|
||||||
{
|
{
|
||||||
const auto url = QString("https://%1:%2/_matrix/client/r0/auth/%4/"
|
const auto url = QStringLiteral("https://%1:%2/_matrix/client/r0/auth/%4/"
|
||||||
"fallback/web?session=%3")
|
"fallback/web?session=%3")
|
||||||
.arg(QString::fromStdString(http::client()->server()))
|
.arg(QString::fromStdString(http::client()->server()))
|
||||||
.arg(http::client()->port())
|
.arg(http::client()->port())
|
||||||
.arg(m_session, m_authType);
|
.arg(m_session, m_authType);
|
||||||
|
|
|
@ -19,8 +19,8 @@ ReCaptcha::ReCaptcha(const QString &session, const QString &context, QObject *pa
|
||||||
void
|
void
|
||||||
ReCaptcha::openReCaptcha()
|
ReCaptcha::openReCaptcha()
|
||||||
{
|
{
|
||||||
const auto url = QString("https://%1:%2/_matrix/client/r0/auth/m.login.recaptcha/"
|
const auto url = QStringLiteral("https://%1:%2/_matrix/client/r0/auth/m.login.recaptcha/"
|
||||||
"fallback/web?session=%3")
|
"fallback/web?session=%3")
|
||||||
.arg(QString::fromStdString(http::client()->server()))
|
.arg(QString::fromStdString(http::client()->server()))
|
||||||
.arg(http::client()->port())
|
.arg(http::client()->port())
|
||||||
.arg(m_session);
|
.arg(m_session);
|
||||||
|
|
|
@ -1110,10 +1110,10 @@ utils::getFormattedQuoteBody(const RelatedInfo &related, const QString &html)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return QString("<mx-reply><blockquote><a "
|
return QStringLiteral("<mx-reply><blockquote><a "
|
||||||
"href=\"https://matrix.to/#/%1/%2\">In reply "
|
"href=\"https://matrix.to/#/%1/%2\">In reply "
|
||||||
"to</a> <a href=\"https://matrix.to/#/%3\">%4</a><br"
|
"to</a> <a href=\"https://matrix.to/#/%3\">%4</a><br"
|
||||||
"/>%5</blockquote></mx-reply>")
|
"/>%5</blockquote></mx-reply>")
|
||||||
.arg(related.room,
|
.arg(related.room,
|
||||||
QString::fromStdString(related.related_event),
|
QString::fromStdString(related.related_event),
|
||||||
related.quoted_user,
|
related.quoted_user,
|
||||||
|
|
|
@ -75,7 +75,7 @@ MediaUpload::thumbnailDataUrl() const
|
||||||
buffer.open(QIODevice::WriteOnly);
|
buffer.open(QIODevice::WriteOnly);
|
||||||
thumbnail_.save(&buffer, "PNG");
|
thumbnail_.save(&buffer, "PNG");
|
||||||
QString base64 = QString::fromUtf8(byteArray.toBase64());
|
QString base64 = QString::fromUtf8(byteArray.toBase64());
|
||||||
return QString("data:image/png;base64,") + base64;
|
return QStringLiteral("data:image/png;base64,") + base64;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Reference in a new issue