mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-18 01:54:25 -05: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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public:
|
|||
void processSettings(bool load);
|
||||
void addGroupToExpand(const RsNodeGroupId &groupId);
|
||||
bool getExpandedGroups(std::set<RsNodeGroupId> &groups) const;
|
||||
void addPeerToExpand(const std::string &gpgId);
|
||||
bool getExpandedPeers(std::set<std::string> &peers) const;
|
||||
void addPeerToExpand(const RsPgpId &gpgId);
|
||||
bool getExpandedPeers(std::set<RsPgpId> &peers) const;
|
||||
|
||||
std::string getSelectedGroupId() const;
|
||||
|
||||
|
|
@ -120,8 +120,7 @@ private:
|
|||
|
||||
bool groupsHasChanged;
|
||||
std::set<RsNodeGroupId> openGroups;
|
||||
#warning this would needs an ID, not a std::string.
|
||||
std::set<std::string> openPeers;
|
||||
std::set<RsPgpId> openPeers;
|
||||
|
||||
/* Color definitions (for standard see qss.default) */
|
||||
QColor mTextColorGroup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue