--- 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);
}