Commit ae3aa1ff29fe7f40c337e0a81bbdef26648d54cc
1 parent
7194b9d5
git-svn-id: svn://imanolbarba.net/PAD@58 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
2 changed files
with
3 additions
and
3 deletions
QChatClient/chatwidget.cpp
... | ... | @@ -11,7 +11,7 @@ void ChatWidget::printMsg(const string &str) |
11 | 11 | this->setFontWeight(QFont::Normal); |
12 | 12 | this->setFontItalic(false); |
13 | 13 | this->setTextColor(Qt::black); |
14 | - this->append(QString::fromStdString(str)); | |
14 | + this->append(QString::fromUtf8(str.c_str())); | |
15 | 15 | } |
16 | 16 | |
17 | 17 | void ChatWidget::printServerMsg(const string &str) | ... | ... |
QChatClient/chatwindow.cpp
... | ... | @@ -26,7 +26,7 @@ ChatWindow::ChatWindow(QString nick, QWidget *parent) : |
26 | 26 | |
27 | 27 | void ChatWindow::notifyClose() |
28 | 28 | { |
29 | - emit ui->actionExit->triggered(); | |
29 | + this->close(); | |
30 | 30 | } |
31 | 31 | |
32 | 32 | void ChatWindow::notifyPrint(string &msg) |
... | ... | @@ -49,7 +49,7 @@ void ChatWindow::printMsg(QString str) |
49 | 49 | |
50 | 50 | void ChatWindow::sendMsg() |
51 | 51 | { |
52 | - QString msg = ui->inputText->toPlainText(); | |
52 | + QString msg = ui->inputText->toPlainText().toUtf8(); | |
53 | 53 | ui->inputText->clear(); |
54 | 54 | msg = "@" + nickName + " " +msg; |
55 | 55 | ((Chatroom*)this->parent())->putMsgToSendQueue(msg); | ... | ... |