display correct group string instread of group ids in SharedFilesDialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5815 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-13 19:37:51 +00:00
parent 9581e83c01
commit f1d3cf102f

View File

@ -205,16 +205,19 @@ QString RetroshareDirModel::getFlagsString(FileStorageFlags flags)
return QString(str) ;
}
QString RetroshareDirModel::getGroupsString(const std::list<std::string>& groups)
QString RetroshareDirModel::getGroupsString(const std::list<std::string>& group_ids)
{
QString groups_str ;
RsGroupInfo group_info ;
for(std::list<std::string>::const_iterator it(groups.begin());it!=groups.end();)
{
groups_str += QString::fromStdString(*it) ;
if(++it != groups.end())
groups_str += ", " ;
}
for(std::list<std::string>::const_iterator it(group_ids.begin());it!=group_ids.end();)
if(rsPeers->getGroupInfo(*it,group_info))
{
groups_str += QString::fromStdString(group_info.name) ;
if(++it != group_ids.end())
groups_str += ", " ;
}
return groups_str ;
}