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
-3
View File
@@ -25,10 +25,7 @@ Channel::Channel(WindowManager &_windowManager, EmoteManager &_emoteManager,
: windowManager(_windowManager) : windowManager(_windowManager)
, emoteManager(_emoteManager) , emoteManager(_emoteManager)
, ircManager(_ircManager) , ircManager(_ircManager)
, _messages()
, _name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1) : channel) , _name((channel.length() > 0 && channel[0] == '#') ? channel.mid(1) : channel)
, _bttvChannelEmotes()
, _ffzChannelEmotes()
, _subLink("https://www.twitch.tv/" + _name + "/subscribe?ref=in_chat_subscriber_link") , _subLink("https://www.twitch.tv/" + _name + "/subscribe?ref=in_chat_subscriber_link")
, _channelLink("https://twitch.tv/" + _name) , _channelLink("https://twitch.tv/" + _name)
, _popoutPlayerLink("https://player.twitch.tv/?channel=" + _name) , _popoutPlayerLink("https://player.twitch.tv/?channel=" + _name)
+3 -14
View File
@@ -45,18 +45,12 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
this->refreshTheme(); this->refreshTheme();
this->setMessageLengthVisible(SettingsManager::getInstance().showMessageLength.get()); this->setMessageLengthVisible(SettingsManager::getInstance().showMessageLength.get());
QStringList list; // TODO: Fill in this QCompleter model using our CompletionManager
/*list.append("asd"); auto completer = new QCompleter();
list.append("asdf");
list.append("asdg");
list.append("asdh");
*/
list << "Kappa" << "asd" << "asdf" << "asdg";
QCompleter *completer = new QCompleter(list, &this->textInput);
this->textInput.setCompleter(completer); 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) { if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
auto c = this->chatWidget->getChannel(); auto c = this->chatWidget->getChannel();
if (c == nullptr) { if (c == nullptr) {
@@ -67,11 +61,6 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *_chatWidget)
event->accept(); event->accept();
textInput.setText(QString()); textInput.setText(QString());
} }
// else {
// completer->setCompletionPrefix("asdf");
// completer->complete();
// // completer->popup();
// }
}); });
/* XXX(pajlada): FIX THIS /* XXX(pajlada): FIX THIS