added autocompletion for commands

This commit is contained in:
fourtf 2018-06-24 11:24:21 +02:00
parent 2b99a3574c
commit f5a05543cd
2 changed files with 7 additions and 0 deletions

View file

@ -2,6 +2,7 @@
#include "application.hpp"
#include "common.hpp"
#include "controllers/commands/commandcontroller.hpp"
#include "debug/log.hpp"
#include "singletons/emotemanager.hpp"
@ -63,6 +64,11 @@ void CompletionModel::refresh()
this->addString(":" + m + ":", TaggedString::Type::Emoji);
}
// Commands
for (auto &command : app->commands->items.getVector()) {
this->addString(command.name, TaggedString::Command);
}
// Channel-specific: Usernames
// fourtf: only works with twitch chat
// auto c = singletons::ChannelManager::getInstance().getTwitchChannel(this->channelName);

View file

@ -24,6 +24,7 @@ class CompletionModel : public QAbstractListModel
TwitchGlobalEmote,
TwitchSubscriberEmote,
Emoji,
Command,
};
TaggedString(const QString &_str, Type _type)