mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Prefer empty() over length()
This commit is contained in:
parent
2a2ef2f2e5
commit
b90e39ecb4
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const
|
||||||
return QStringLiteral(
|
return QStringLiteral(
|
||||||
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
|
"<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">")
|
||||||
.arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(),
|
.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)
|
? QString::fromStdString(images[index.row()].image.body)
|
||||||
: images[index.row()].shortcode);
|
: images[index.row()].shortcode);
|
||||||
case Roles::Url:
|
case Roles::Url:
|
||||||
|
|
Loading…
Reference in a new issue