mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-11 10:35:22 -04:00
- Added some performance optimizations in FriendSelectionWidget::peerStatusChanged
- Fixed some ui design git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6442 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
771ae5ba58
commit
cac96b8317
7 changed files with 55 additions and 19 deletions
|
@ -533,6 +533,9 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
|||
while ((item = *itemIterator) != NULL) {
|
||||
itemIterator++;
|
||||
|
||||
bool bFoundGPG = false;
|
||||
bool bFoundSSL = false;
|
||||
|
||||
switch (idTypeFromItem(item)) {
|
||||
case IDTYPE_NONE:
|
||||
case IDTYPE_GROUP:
|
||||
|
@ -549,6 +552,8 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
|||
|
||||
item->setTextColor(COLUMN_NAME, color);
|
||||
item->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(gpgStatus)));
|
||||
|
||||
bFoundGPG = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -564,11 +569,31 @@ void FriendSelectionWidget::peerStatusChanged(const QString& peerId, int status)
|
|||
|
||||
item->setTextColor(COLUMN_NAME, color);
|
||||
item->setIcon(COLUMN_NAME, QIcon(StatusDefs::imageUser(status)));
|
||||
|
||||
bFoundSSL = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// friend can assigned to groups more than one
|
||||
|
||||
if (bFoundGPG) {
|
||||
if (mShowTypes & SHOW_GROUP) {
|
||||
// a friend can be assigned to more than one group
|
||||
} else {
|
||||
if (mShowTypes & SHOW_SSL) {
|
||||
// search for ssl id
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bFoundSSL) {
|
||||
if (mShowTypes & SHOW_GROUP) {
|
||||
// a friend can be assigned to more than one group
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue