Close the TabGames when closing the TabSupervisor (#5735)

* Close the `TabGame`s when closing the `TabSupervisor`

This ensures that we go through the same code path (in terms of Qt
events) when closing the whole supervisor as when closing a single tab.
Also, use the `close` event instead of the `hide` event to detect when
we are closing a game.

Fixes #5697

* Compat with old Qt versions

* Old Qt, reloaded

* Review: use hideEvent and call super
This commit is contained in:
Basile Clement 2025-03-17 00:05:04 +01:00 committed by GitHub
parent 57a8960841
commit 37382dea44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 27 deletions

View file

@ -1018,7 +1018,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
return;
bClosingDown = true;
if (!tabSupervisor->closeRequest()) {
if (!tabSupervisor->close()) {
event->ignore();
bClosingDown = false;
return;