Revert "Reset the input prior to processing it in order to prevent issues with per...
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 22 Jan 2012 20:04:44 +0000 (21:04 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 22 Jan 2012 20:13:51 +0000 (21:13 +0100)
This reverts commit b56a8712f3063e93b68bfa6bd8f2ec67e955df50.

That solution had the side effect that the textEdit would already been cleared when the textEntered() signal
was sent out. This broke the assumption that consumers of that signal could access the edit's content.
We'll find a better solution for the history problems.

src/uisupport/multilineedit.cpp

index 874dce8..82f25de 100644 (file)
@@ -637,11 +637,9 @@ void MultiLineEdit::on_returnPressed(const QString & text) {
       if(line.isEmpty())
         continue;
       addToHistory(line);
-    }
-    reset();
-    foreach(const QString &line, text.split('\n', QString::SkipEmptyParts)) {
       emit textEntered(line);
     }
+    reset();
     _tempHistory.clear();
   } else {
     emit noTextEntered();