mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Refactor: Simplify closeRequest and remove closed signal (#6062)
* Refactor: simplify closeRequest and remove closed signal * clean up closeRequest usages
This commit is contained in:
parent
fd12a1f6be
commit
04be0fe634
11 changed files with 61 additions and 57 deletions
|
|
@ -103,7 +103,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor,
|
|||
hbox->addWidget(userList, 1);
|
||||
|
||||
aLeaveRoom = new QAction(this);
|
||||
connect(aLeaveRoom, &QAction::triggered, this, [this] { closeRequest(); });
|
||||
connect(aLeaveRoom, &QAction::triggered, this, &TabRoom::closeRequest);
|
||||
|
||||
roomMenu = new QMenu(this);
|
||||
roomMenu->addAction(aLeaveRoom);
|
||||
|
|
@ -173,11 +173,11 @@ void TabRoom::actShowPopup(const QString &message)
|
|||
}
|
||||
}
|
||||
|
||||
void TabRoom::closeRequest(bool /*forced*/)
|
||||
void TabRoom::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
sendRoomCommand(prepareRoomCommand(Command_LeaveRoom()));
|
||||
emit roomClosing(this);
|
||||
close();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void TabRoom::tabActivated()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue