Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat: Add ability to quit group with middle click
Browse files Browse the repository at this point in the history
Fix #2605
  • Loading branch information
Diadlo committed May 14, 2018
1 parent 65fc1dc commit 228c431
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/widget/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,15 @@ Group* Widget::createGroup(int groupId)

connect(widget, &GroupWidget::chatroomWidgetClicked, this, &Widget::onChatroomWidgetClicked);
connect(widget, &GroupWidget::newWindowOpened, this, &Widget::openNewDialog);
connect(widget, SIGNAL(removeGroup(int)), this, SLOT(removeGroup(int)));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0))
auto widgetRemoveGroup = QOverload<int>::of(&Widget::removeGroup);
#else
auto widgetRemoveGroup = static_cast<void (Widget::*)(int)>(&Widget::removeGroup);
#endif
connect(widget, &GroupWidget::removeGroup, this, widgetRemoveGroup);
connect(widget, &GroupWidget::middleMouseClicked, this, [=]() {
removeGroup(groupId);
});
connect(widget, &GroupWidget::chatroomWidgetClicked, form, &ChatForm::focusInput);
connect(form, &GroupChatForm::sendMessage, core, &Core::sendGroupMessage);
connect(form, &GroupChatForm::sendAction, core, &Core::sendGroupAction);
Expand Down

0 comments on commit 228c431

Please sign in to comment.