X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Finputline.cpp;h=7511e07a32227d0701b1335a2d0260198d926417;hb=a76d5716fff14a3f21e6c62542e10646981c1067;hp=f6d7171580ea9ca6435003a1c6d896fe8cfd6414;hpb=8699dd758516d0ded076811e8ea656adc95e69d0;p=quassel.git 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();