summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 20:09:08 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-28 20:09:08 +0100
commit5ca98829f7c5bf504e78bd51e6ceb534c023ae05 (patch)
tree2e624400f17b2b8220431a500e4ffc9f3671e4a7 /src/timeline/InputBar.cpp
parentMisc clang-tidy fixes (diff)
downloadnheko-5ca98829f7c5bf504e78bd51e6ceb534c023ae05.tar.xz
Some qt6 prep
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index 191160ea..edc21e54 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -140,7 +140,7 @@ InputBar::updateAtRoom(const QString &t)
             auto start = finder.position();
             finder.toNextBoundary();
             auto end = finder.position();
-            if (start > 0 && end - start >= 4 && t.midRef(start, end - start) == "room" &&
+            if (start > 0 && end - start >= 4 && t.mid(start, end - start) == "room" &&
                 t.at(start - 1) == QChar('@')) {
                 roomMention = true;
                 break;
@@ -324,7 +324,7 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow
 
         QString body;
         bool firstLine = true;
-        for (const auto &line : related.quoted_body.split("\n")) {
+        for (auto line : related.quoted_body.splitRef(u'\n')) {
             if (firstLine) {
                 firstLine = false;
                 body      = QString("> <%1> %2\n").arg(related.quoted_user, line);
@@ -707,9 +707,9 @@ InputBar::showPreview(const QMimeData &source, const QString &path, const QStrin
 
           QSize dimensions;
           QString blurhash;
-          auto mimeClass = mime.split("/")[0];
+          auto mimeClass = mime.splitRef(u'/')[0];
           nhlog::ui()->debug("Mime: {}", mime.toStdString());
-          if (mimeClass == "image") {
+          if (mimeClass == u"image") {
               QImage img = utils::readImage(data);
 
               dimensions = img.size();