diff --git a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp index bb769d21c..8a872f455 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyDialog.cpp @@ -335,16 +335,19 @@ void ChatLobbyDialog::updateParticipantsList() if (it != lInfos.end()) { ChatLobbyInfo cliInfo=(*it); - QList qlOldParticipants=ui.participantsList->findItems("*",Qt::MatchWildcard); + QList qlOldParticipants=ui.participantsList->findItems("*",Qt::MatchWildcard,COLUMN_NAME); foreach(QTreeWidgetItem *qtwiCur,qlOldParticipants){ QString qsOldParticipant = qtwiCur->text(COLUMN_NAME); + QByteArray qbaPart=qsOldParticipant.toUtf8(); + std::string strTemp=std::string(qbaPart.begin(),qbaPart.end()); - std::map::iterator itFound(cliInfo.nick_names.find(qsOldParticipant.toStdString())) ; + std::map::iterator itFound(cliInfo.nick_names.find(strTemp)) ; if(itFound == cliInfo.nick_names.end()) { //Old Participant go out, remove it - ui.participantsList->removeItemWidget(qtwiCur,0); + int index = ui.participantsList->indexOfTopLevelItem(qtwiCur); + delete ui.participantsList->takeTopLevelItem(index); } }