From ae3aa1ff29fe7f40c337e0a81bbdef26648d54cc Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Fri, 10 Jan 2014 18:41:42 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@58 c2ee353e-ed0d-4329-bf56-03aec153487f --- QChatClient/chatwidget.cpp | 2 +- QChatClient/chatwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/QChatClient/chatwidget.cpp b/QChatClient/chatwidget.cpp index 69f1809..d6aebab 100644 --- a/QChatClient/chatwidget.cpp +++ b/QChatClient/chatwidget.cpp @@ -11,7 +11,7 @@ void ChatWidget::printMsg(const string &str) this->setFontWeight(QFont::Normal); this->setFontItalic(false); this->setTextColor(Qt::black); - this->append(QString::fromStdString(str)); + this->append(QString::fromUtf8(str.c_str())); } void ChatWidget::printServerMsg(const string &str) diff --git a/QChatClient/chatwindow.cpp b/QChatClient/chatwindow.cpp index 56fc9aa..0903c93 100644 --- a/QChatClient/chatwindow.cpp +++ b/QChatClient/chatwindow.cpp @@ -26,7 +26,7 @@ ChatWindow::ChatWindow(QString nick, QWidget *parent) : void ChatWindow::notifyClose() { - emit ui->actionExit->triggered(); + this->close(); } void ChatWindow::notifyPrint(string &msg) @@ -49,7 +49,7 @@ void ChatWindow::printMsg(QString str) void ChatWindow::sendMsg() { - QString msg = ui->inputText->toPlainText(); + QString msg = ui->inputText->toPlainText().toUtf8(); ui->inputText->clear(); msg = "@" + nickName + " " +msg; ((Chatroom*)this->parent())->putMsgToSendQueue(msg); -- libgit2 0.22.2