Don't send empty lines with KTextEdit
authorSebastian Goth <seezer@roath.org>
Sat, 14 Mar 2009 12:55:40 +0000 (13:55 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 14 Mar 2009 22:44:54 +0000 (23:44 +0100)
Fixes #623.

src/uisupport/inputline.cpp

index d7b18f4..3fe70c7 100644 (file)
@@ -131,7 +131,8 @@ void InputLine::keyPressEvent(QKeyEvent * event) {
 //Since this is a ktextedit, we don't have this signal "natively"
   case Qt::Key_Return:
     event->accept();
-    emit returnPressed();
+    if(!text().isEmpty())
+      emit returnPressed();
     break;
 
 #endif