From ea6b19b3077dad0280e32aa762137728432e01f4 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 27 Dec 2021 06:23:36 +0100 Subject: Add an ugly custom emote completer using ~ --- src/CombinedImagePackModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/CombinedImagePackModel.cpp') 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("\"%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: -- cgit 1.5.1