1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Modified context menu to help prevent accidental friend deletion

This commit is contained in:
Kevin Flynn 2014-07-01 14:58:26 -07:00
parent 8f9efc7805
commit 57e53079c5

View File

@ -63,7 +63,6 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
QPoint pos = event->globalPos();
QMenu menu;
menu.addAction("Copy friend ID");
menu.addAction("Remove friend");
QMenu* inviteMenu = menu.addMenu("Invite in group");
QMap<QAction*, Group*> groupActions;
for (Group* group : GroupList::groupList)
@ -73,6 +72,8 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
}
if (groupActions.isEmpty())
inviteMenu->setEnabled(false);
menu.addSeparator();
menu.addAction("Remove friend");
QAction* selectedItem = menu.exec(pos);
if (selectedItem)