From: Sebastian Goth Date: Sat, 14 Mar 2009 22:43:23 +0000 (+0100) Subject: really don't.. X-Git-Tag: 0.5-rc1~277 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=af569a42f6635f6abfcedeb45b730ee64d53e0b8 really don't.. --- diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 3fe70c71..c04a3f25 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -135,6 +135,12 @@ void InputLine::keyPressEvent(QKeyEvent * event) { emit returnPressed(); break; + case Qt::Key_Enter: + event->accept(); + if(!text().isEmpty()) + emit returnPressed(); + break; + #endif default: @@ -214,9 +220,11 @@ void InputLine::on_textChanged(QString newText) { } foreach(QString line, lines) { - clear(); - insert(line); - emit returnPressed(); + if(!line.isEmpty()) { + clear(); + insert(line); + emit returnPressed(); + } } // if(newText.contains(lineSep)) { // clear();