QTfrontend/chatwidget.cpp
changeset 5990 578978418fe5
parent 5953 57af6f3abf4a
child 5998 e8f44e9433f0
--- a/QTfrontend/chatwidget.cpp	Thu Sep 22 11:44:39 2011 +0400
+++ b/QTfrontend/chatwidget.cpp	Thu Sep 22 14:02:44 2011 +0200
@@ -30,6 +30,7 @@
 #include <QCursor>
 #include <QScrollBar>
 #include <QItemSelectionModel>
+#include <QStringList>
 
 #include "hwconsts.h"
 #include "SDLs.h"
@@ -313,8 +314,10 @@
 
 void HWChatWidget::returnPressed()
 {
-    emit chatLine(chatEditLine->text());
+    QStringList lines = chatEditLine->text().split('\n');
     chatEditLine->clear();
+    foreach (const QString &line, lines)
+        emit chatLine(line);
 }