We now also add localized names to the autocompletion

Changed the login name in autocompletion to the display name
Autocompletion model is now only updated on the "first completion"
This commit is contained in:
Rasmus Karlsson
2017-12-17 21:05:25 +01:00
parent 6f1509cb4f
commit 03958420be
9 changed files with 45 additions and 28 deletions
+3 -3
View File
@@ -13,18 +13,18 @@ class CompletionModel : public QAbstractListModel
public:
CompletionModel(const QString &_channelName);
virtual int columnCount(const QModelIndex & /*parent*/) const override
virtual int columnCount(const QModelIndex &) const override
{
return 1;
}
virtual QVariant data(const QModelIndex &index, int role) const override
virtual QVariant data(const QModelIndex &index, int) const override
{
// TODO: Implement more safely
return QVariant(this->emotes.at(index.row()));
}
virtual int rowCount(const QModelIndex &parent) const override
virtual int rowCount(const QModelIndex &) const override
{
return this->emotes.size();
}