mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 05:39:11 -04:00
changed from std::string to RsPgpId to represent openned items in FriendList
This commit is contained in:
parent
f3d7948238
commit
6937d870b0
4 changed files with 10 additions and 11 deletions
|
@ -1196,7 +1196,7 @@ void FriendList::insertPeers()
|
|||
gpgItem->setFont(i, gpgFont);
|
||||
}
|
||||
|
||||
if (openPeers.find(gpgId.toStdString()) != openPeers.end()) {
|
||||
if (openPeers.find(gpgId) != openPeers.end()) {
|
||||
gpgItem->setExpanded(true);
|
||||
}
|
||||
}
|
||||
|
@ -1253,14 +1253,14 @@ bool FriendList::getExpandedGroups(std::set<RsNodeGroupId> &groups) const
|
|||
/**
|
||||
* Returns a list with all gpg ids that are expanded
|
||||
*/
|
||||
bool FriendList::getExpandedPeers(std::set<std::string> &peers) const
|
||||
bool FriendList::getExpandedPeers(std::set<RsPgpId> &peers) const
|
||||
{
|
||||
peers.clear();
|
||||
QTreeWidgetItemIterator it(ui->peerTreeWidget);
|
||||
while (*it) {
|
||||
QTreeWidgetItem *item = *it;
|
||||
if (item->type() == TYPE_GPG && item->isExpanded()) {
|
||||
peers.insert(peers.end(), getRsId(item));
|
||||
peers.insert(peers.end(), RsPgpId(getRsId(item)));
|
||||
}
|
||||
++it;
|
||||
}
|
||||
|
@ -2282,7 +2282,7 @@ void FriendList::addGroupToExpand(const RsNodeGroupId &groupId)
|
|||
* Add a gpgId to the openPeers list. These peers
|
||||
* will be expanded, when they're added to the QTreeWidget
|
||||
*/
|
||||
void FriendList::addPeerToExpand(const std::string &gpgId)
|
||||
void FriendList::addPeerToExpand(const RsPgpId& gpgId)
|
||||
{
|
||||
openPeers.insert(gpgId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue