From 5743a6de04b545b4573f61754461d1c271856001 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 28 Dec 2021 23:22:01 +0100 Subject: Cleanup remaining clazy issues --- src/Utils.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Utils.cpp') diff --git a/src/Utils.cpp b/src/Utils.cpp index 1cfda279..55e075fe 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -256,7 +256,7 @@ utils::firstChar(const QString &input) if (input.isEmpty()) return input; - for (auto const &c : input.toUcs4()) { + for (auto const &c : input.toStdU32String()) { if (QString::fromUcs4(&c, 1) != QString("#")) return QString::fromUcs4(&c, 1).toUpper(); } @@ -374,8 +374,7 @@ utils::mxcToHttp(const QUrl &url, const QString &server, int port) return QString("https://%1:%2/_matrix/media/r0/download/%3/%4") .arg(server) .arg(port) - .arg(QString::fromStdString(mxcParts.server)) - .arg(QString::fromStdString(mxcParts.media_id)); + .arg(QString::fromStdString(mxcParts.server), QString::fromStdString(mxcParts.media_id)); } QString @@ -516,7 +515,7 @@ utils::markdownToHtml(const QString &text, bool rainbowify) QStringView(nodeText).mid(boundaryStart, boundaryEnd - boundaryStart); boundaryStart = boundaryEnd; // Don't rainbowify whitespaces - if (curChar.trimmed().isEmpty() || codepointIsEmoji(curChar.toUcs4().first())) { + if (curChar.trimmed().isEmpty() || codepointIsEmoji(curChar.toUcs4().at(0))) { buf.append(curChar); continue; } -- cgit 1.4.1