diff --git a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp index 16e0c7093..d6239232a 100644 --- a/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/CreateLobbyDialog.cpp @@ -43,7 +43,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list& peer_list, in ui->lobbyName_LE->setPlaceholderText(tr("Put a sensible lobby name here")) ; ui->nickName_LE->setPlaceholderText(tr("Your nickname for this lobby (Change default name in options->chat)")) ; #endif - ui->nickName_LE->setText(QString::fromStdString(default_nick)) ; + ui->nickName_LE->setText(QString::fromUtf8(default_nick.c_str())) ; connect( ui->shareButton, SIGNAL( clicked ( bool ) ), this, SLOT( createLobby( ) ) ); connect( ui->cancelButton, SIGNAL( clicked ( bool ) ), this, SLOT( cancel( ) ) ); @@ -111,7 +111,7 @@ void CreateLobbyDialog::createLobby() // set nick name ! - rsMsgs->setNickNameForChatLobby(id,ui->nickName_LE->text().toStdString()) ; + rsMsgs->setNickNameForChatLobby(id,ui->nickName_LE->text().toUtf8().constData()) ; // open chat window !! std::string vpid ; diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index 45eda072a..94ceb6953 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -116,7 +116,7 @@ ChatPage::save(QString &/*errmsg*/) rsHistory->setSaveCount(true, ui.publicChatSaveCount->value()); rsHistory->setSaveCount(false, ui.privateChatSaveCount->value()); - rsMsgs->setDefaultNickNameForChatLobby(ui.chatLobbyNick_LE->text().toStdString()) ; + rsMsgs->setDefaultNickNameForChatLobby(ui.chatLobbyNick_LE->text().toUtf8().constData()) ; ChatStyleInfo info; QListWidgetItem *item = ui.publicList->currentItem(); @@ -179,9 +179,9 @@ ChatPage::load() privateStylePath = loadStyleInfo(ChatStyle::TYPE_PRIVATE, ui.privateList, ui.privateComboBoxVariant, privateStyleVariant); historyStylePath = loadStyleInfo(ChatStyle::TYPE_HISTORY, ui.historyList, ui.historyComboBoxVariant, historyStyleVariant); - std::string nick ; - rsMsgs->getDefaultNickNameForChatLobby(nick) ; - ui.chatLobbyNick_LE->setText(QString::fromStdString(nick)) ; + std::string nick ; + rsMsgs->getDefaultNickNameForChatLobby(nick) ; + ui.chatLobbyNick_LE->setText(QString::fromUtf8(nick.c_str())) ; } void ChatPage::on_pushButtonChangeChatFont_clicked()