X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Finputline.cpp;h=7511e07a32227d0701b1335a2d0260198d926417;hp=f6d7171580ea9ca6435003a1c6d896fe8cfd6414;hb=50706d89d4d60e258ebb6873d3778383621898e4;hpb=fd7c2c4a41b5bb9cffcfe7a8f86a28ab7f38ac27 diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index f6d71715..7511e07a 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -22,15 +22,15 @@ #include "tabcompleter.h" -InputLine::InputLine(QWidget *parent) : QLineEdit(parent) { - idx = 0; +InputLine::InputLine(QWidget *parent) + : QLineEdit(parent), + idx(0) +{ connect(this, SIGNAL(returnPressed()), this, SLOT(enter())); tabComplete = new TabCompleter(this); - connect(this, SIGNAL(nickListUpdated(QStringList)), tabComplete, SLOT(updateNickList(QStringList))); } InputLine::~InputLine() { - delete tabComplete; } void InputLine::keyPressEvent(QKeyEvent * event) { @@ -38,7 +38,7 @@ void InputLine::keyPressEvent(QKeyEvent * event) { tabComplete->complete(); event->accept(); } else { - tabComplete->disable(); + tabComplete->reset(); if(event->key() == Qt::Key_Up) { if(idx > 0) { idx--; setText(history[idx]); } event->accept();