mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-27 15:57:08 -05:00
Fixed handling of utf8 characters in lobby nick name.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4878 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
77d668fc38
commit
20b00401ec
@ -43,7 +43,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::list<std::string>& 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 ;
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user