|
|
|
@ -63,7 +63,6 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
@@ -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)
@@ -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) |
|
|
|
|