summary refs log tree commit diff
path: root/src/CombinedImagePackModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-27 06:23:36 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-27 06:23:36 +0100
commitea6b19b3077dad0280e32aa762137728432e01f4 (patch)
tree038043c9f7796a498b86bfd514533e734b56d805 /src/CombinedImagePackModel.cpp
parentAdd man page (#851) (diff)
downloadnheko-ea6b19b3077dad0280e32aa762137728432e01f4.tar.xz
Add an ugly custom emote completer using ~
Diffstat (limited to 'src/CombinedImagePackModel.cpp')
-rw-r--r--src/CombinedImagePackModel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CombinedImagePackModel.cpp b/src/CombinedImagePackModel.cpp

index 9a52f810..2a8959c0 100644 --- a/src/CombinedImagePackModel.cpp +++ b/src/CombinedImagePackModel.cpp
@@ -56,7 +56,9 @@ CombinedImagePackModel::data(const QModelIndex &index, int role) const if (hasIndex(index.row(), index.column(), index.parent())) { switch (role) { case CompletionModel::CompletionRole: - return QString::fromStdString(images[index.row()].image.url); + return QString("<img data-mx-emoticon height=32 src=\"%1\" alt=\"%2\" title=\"%2\">") + .arg(QString::fromStdString(images[index.row()].image.url).toHtmlEscaped(), + images[index.row()].shortcode); case Roles::Url: return QString::fromStdString(images[index.row()].image.url); case CompletionModel::SearchRole: