Port to QStringLiteral operator

This commit is contained in:
Jonas Kvinge
2024-10-20 06:38:55 +02:00
parent 722035913e
commit ef9ef63f02
202 changed files with 2036 additions and 1889 deletions

View File

@@ -114,7 +114,7 @@ QString DecodeHtmlEntities(const QString &text) {
QString ReplaceMessage(const QString &message, const Song &song, const QString &newline, const bool html_escaped) {
static const QRegularExpression variable_replacer(QStringLiteral("[%][a-z]+[%]"));
static const QRegularExpression variable_replacer(u"[%][a-z]+[%]"_s);
QString copy(message);
// Replace the first line
@@ -127,7 +127,7 @@ QString ReplaceMessage(const QString &message, const Song &song, const QString &
pos += match.capturedLength();
}
static const QRegularExpression regexp(QStringLiteral(" - (>|$)"));
static const QRegularExpression regexp(u" - (>|$)"_s);
qint64 index_of = copy.indexOf(regexp);
if (index_of >= 0) copy = copy.remove(index_of, 3);