summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 23:22:01 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 23:22:01 +0100
commit5743a6de04b545b4573f61754461d1c271856001 (patch)
tree68710950de3cf82d166146eb0701905ca3fab3f4 /src/Utils.cpp
parentMerge pull request #855 from rnhmjoj/master (diff)
downloadnheko-5743a6de04b545b4573f61754461d1c271856001.tar.xz
Cleanup remaining clazy issues
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp7
1 files changed, 3 insertions, 4 deletions
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;
                 }