summary refs log tree commit diff
path: root/src/CombinedImagePackModel.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-02-21 00:27:01 +0000
committerGitHub <noreply@github.com>2022-02-21 00:27:01 +0000
commitb90e39ecb4c595260f5fe0ba81309d60c1a87b28 (patch)
treed755a99d9d2250f14b5dd13d175f8a41df0c2eee /src/CombinedImagePackModel.cpp
parentuse shortcode as a fallback for custom emote title (diff)
downloadnheko-b90e39ecb4c595260f5fe0ba81309d60c1a87b28.tar.xz
Prefer empty() over length()
Diffstat (limited to '')
-rw-r--r--src/CombinedImagePackModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CombinedImagePackModel.cpp b/src/CombinedImagePackModel.cpp
index 58400fb1..6dadbef4 100644
--- a/src/CombinedImagePackModel.cpp
+++ b/src/CombinedImagePackModel.cpp
@@ -60,7 +60,7 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const
             return QStringLiteral(
                      "<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
               .arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(),
-                   images[index.row()].image.body.length() > 0
+                   !images[index.row()].image.body.empty()
                      ? QString::fromStdString(images[index.row()].image.body)
                      : images[index.row()].shortcode);
         case Roles::Url: