Remove current preset completion strings

These will be filled in using our CompletionManager soon™️

Refactor Channel class a bit
This commit is contained in:
Rasmus Karlsson 2017-07-09 17:50:03 +02:00
parent b5b07a3e63
commit 1f1b0d7f03
2 changed files with 3 additions and 17 deletions

View file

@ -25,10 +25,7 @@ Channel::Channel(WindowManager &_windowManager, EmoteManager &_emoteManager,
: windowManager(_windowManager)
, emoteManager(_emoteManager)
, ircManager(_ircManager)
, _messages()
, _name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1) : channel)
, _bttvChannelEmotes()
, _ffzChannelEmotes()
, _subLink("https://www.twitch.tv/" + _name + "/subscribe?ref=in_chat_subscriber_link")
, _channelLink("https://twitch.tv/" + _name)
, _popoutPlayerLink("https://player.twitch.tv/?channel=" + _name)

View file

@ -45,18 +45,12 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
this->refreshTheme();
this->setMessageLengthVisible(SettingsManager::getInstance().showMessageLength.get());
QStringList list;
/*list.append("asd");
list.append("asdf");
list.append("asdg");
list.append("asdh");
*/
list << "Kappa" << "asd" << "asdf" << "asdg";
QCompleter *completer = new QCompleter(list, &this->textInput);
// TODO: Fill in this QCompleter model using our CompletionManager
auto completer = new QCompleter();
this->textInput.setCompleter(completer);
this->textInput.keyPressed.connect([this /*, completer*/](QKeyEvent *event) {
this->textInput.keyPressed.connect([this](QKeyEvent *event) {
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
auto c = this->chatWidget->getChannel();
if (c == nullptr) {
@ -67,11 +61,6 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
event->accept();
textInput.setText(QString());
}
// else {
// completer->setCompletionPrefix("asdf");
// completer->complete();
// // completer->popup();
// }
});
/* XXX(pajlada): FIX THIS