mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-24 00:31:32 -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,6 @@ signals:
|
|||
|
||||
private slots:
|
||||
void fillList();
|
||||
void secured_fillList();
|
||||
void peerStatusChanged(const QString& peerId, int status);
|
||||
void filterItems(const QString &text);
|
||||
void contextMenuRequested(const QPoint &pos);
|
||||
|
@ -116,6 +115,7 @@ private slots:
|
|||
void deselectAll() ;
|
||||
|
||||
private:
|
||||
void secured_fillList();
|
||||
bool filterItem(QTreeWidgetItem *item, const QString &text);
|
||||
|
||||
void selectedIds(IdType idType, std::list<std::string> &ids, bool onlyDirectSelected);
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="friendList">
|
||||
<property name="minimumSize">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue