From b90e39ecb4c595260f5fe0ba81309d60c1a87b28 Mon Sep 17 00:00:00 2001 From: "DeepBlueV7.X" <nicolas.werner@hotmail.de> Date: Mon, 21 Feb 2022 00:27:01 +0000 Subject: [PATCH] Prefer empty() over length() --- src/CombinedImagePackModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CombinedImagePackModel.cpp b/src/CombinedImagePackModel.cpp index 58400fb1a..6dadbef45 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: -- GitLab