mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed trick for own Ids in GxsIdTreeWidgetItem
This commit is contained in:
parent
6a2886da40
commit
7b0d501c1e
@ -1 +1 @@
|
||||
Subproject commit 8f3a3070519322a66b0e83ecb2035e0ac7e67e58
|
||||
Subproject commit d2651109f8d71659197b2d5315e36cf7d47ba034
|
@ -109,7 +109,9 @@ public:
|
||||
QList<QIcon> icons;
|
||||
QString comment;
|
||||
|
||||
if(rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
if(id.isNull())
|
||||
name = QObject::tr("[System]");
|
||||
else if(RsPeerId(id)==rsPeers->getOwnId() || rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
name = QString::fromUtf8(rsPeers->getPeerName(RsPeerId(id)).c_str()) ;
|
||||
else if(!GxsIdDetails::MakeIdDesc(id, false, name, icons, comment,GxsIdDetails::ICON_TYPE_NONE))
|
||||
return false;
|
||||
@ -123,7 +125,12 @@ public:
|
||||
bool exist = false;
|
||||
|
||||
|
||||
if(rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
if(id.isNull())
|
||||
{
|
||||
name = QObject::tr("[System]");
|
||||
icon = QIcon();
|
||||
}
|
||||
else if(RsPeerId(id)==rsPeers->getOwnId() || rsPeers->isFriend(RsPeerId(id))) // horrible trick because some widgets still use locations as IDs (e.g. messages)
|
||||
{
|
||||
name = QString::fromUtf8(rsPeers->getPeerName(RsPeerId(id)).c_str()) ;
|
||||
icon = FilesDefs::getIconFromQtResourcePath(":/icons/avatar_128.png");
|
||||
|
Loading…
Reference in New Issue
Block a user