Linkify username completion

This commit is contained in:
Nicolas Werner 2020-11-24 19:01:52 +01:00
parent 0cf556fa20
commit c07c326141

View file

@ -32,6 +32,9 @@ UsersModel::data(const QModelIndex &index, int role) const
if (hasIndex(index.row(), index.column(), index.parent())) { if (hasIndex(index.row(), index.column(), index.parent())) {
switch (role) { switch (role) {
case CompletionModel::CompletionRole: case CompletionModel::CompletionRole:
return QString("[%1](https://matrix.to/#/%2)")
.arg(displayNames[index.row()])
.arg(userids[index.row()]);
case CompletionModel::SearchRole: case CompletionModel::SearchRole:
case Qt::DisplayRole: case Qt::DisplayRole:
case Roles::DisplayName: case Roles::DisplayName: