fixed connection for "deny friend" function in FriendList

This commit is contained in:
csoler 2019-08-30 11:11:40 +02:00
parent 0ddeaaf810
commit 4d96c71942
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -567,7 +567,7 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
case RsFriendListModel::ENTRY_TYPE_PROFILE: case RsFriendListModel::ENTRY_TYPE_PROFILE:
{ {
contextMenu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configureProfile())); contextMenu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Profile details"), this, SLOT(configureProfile()));
contextMenu.addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removefriend())); contextMenu.addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny connections"), this, SLOT(removeProfile()));
RsFriendListModel::RsProfileDetails details; RsFriendListModel::RsProfileDetails details;
mModel->getProfileData(index,details); mModel->getProfileData(index,details);
@ -902,6 +902,8 @@ void NewFriendList::removeNode()
if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this node?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes) if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this node?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes)
rsPeers->removeFriendLocation(det.id); rsPeers->removeFriendLocation(det.id);
checkInternalData(true);
} }
void NewFriendList::removeProfile() void NewFriendList::removeProfile()
@ -913,6 +915,7 @@ void NewFriendList::removeProfile()
if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this Friend?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes) if ((QMessageBox::question(this, "RetroShare", tr("Do you want to remove this Friend?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes)) == QMessageBox::Yes)
rsPeers->removeFriend(det.gpg_id); rsPeers->removeFriend(det.gpg_id);
checkInternalData(true);
} }
void NewFriendList::connectNode() void NewFriendList::connectNode()