From f60d8cbb1a12120ee05158ce5686830816fcbc07 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 8 Mar 2015 13:56:29 +0000 Subject: [PATCH] fixed completion in chat lobbies git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8000 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 330be4745..afade184c 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -621,18 +621,23 @@ QAbstractItemModel *ChatWidget::modelFromPeers() return new QStringListModel(completer); #ifndef QT_NO_CURSOR - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); #endif -#warning still need to use real nicknames for nickname completion. // Get participants list - QStringList participants; - for ( std::map::const_iterator it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it) - participants.push_front(QString::fromUtf8(it->first.toStdString().c_str())); + QStringList participants; + + for (std::map::const_iterator it = lobby.gxs_ids.begin(); it != lobby.gxs_ids.end(); ++it) + { + RsIdentityDetails details ; + rsIdentity->getIdDetails(it->first,details) ; + + participants.push_front(QString::fromUtf8(details.mNickname.c_str())); + } #ifndef QT_NO_CURSOR - QApplication::restoreOverrideCursor(); + QApplication::restoreOverrideCursor(); #endif - return new QStringListModel(participants, completer); + return new QStringListModel(participants, completer); } void ChatWidget::addToolsAction(QAction *action)