Commit ae3aa1ff29fe7f40c337e0a81bbdef26648d54cc

Authored by Imanol-Mikel Barba Sabariego
1 parent 7194b9d5

git-svn-id: svn://imanolbarba.net/PAD@58 c2ee353e-ed0d-4329-bf56-03aec153487f

QChatClient/chatwidget.cpp
@@ -11,7 +11,7 @@ void ChatWidget::printMsg(const string &str) @@ -11,7 +11,7 @@ void ChatWidget::printMsg(const string &str)
11 this->setFontWeight(QFont::Normal); 11 this->setFontWeight(QFont::Normal);
12 this->setFontItalic(false); 12 this->setFontItalic(false);
13 this->setTextColor(Qt::black); 13 this->setTextColor(Qt::black);
14 - this->append(QString::fromStdString(str)); 14 + this->append(QString::fromUtf8(str.c_str()));
15 } 15 }
16 16
17 void ChatWidget::printServerMsg(const string &str) 17 void ChatWidget::printServerMsg(const string &str)
QChatClient/chatwindow.cpp
@@ -26,7 +26,7 @@ ChatWindow::ChatWindow(QString nick, QWidget *parent) : @@ -26,7 +26,7 @@ ChatWindow::ChatWindow(QString nick, QWidget *parent) :
26 26
27 void ChatWindow::notifyClose() 27 void ChatWindow::notifyClose()
28 { 28 {
29 - emit ui->actionExit->triggered(); 29 + this->close();
30 } 30 }
31 31
32 void ChatWindow::notifyPrint(string &msg) 32 void ChatWindow::notifyPrint(string &msg)
@@ -49,7 +49,7 @@ void ChatWindow::printMsg(QString str) @@ -49,7 +49,7 @@ void ChatWindow::printMsg(QString str)
49 49
50 void ChatWindow::sendMsg() 50 void ChatWindow::sendMsg()
51 { 51 {
52 - QString msg = ui->inputText->toPlainText(); 52 + QString msg = ui->inputText->toPlainText().toUtf8();
53 ui->inputText->clear(); 53 ui->inputText->clear();
54 msg = "@" + nickName + " " +msg; 54 msg = "@" + nickName + " " +msg;
55 ((Chatroom*)this->parent())->putMsgToSendQueue(msg); 55 ((Chatroom*)this->parent())->putMsgToSendQueue(msg);