From 2f33ce978854422ef1e1d2c08d724e7edd3b6357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Basile=20Cl=C3=A9ment?= Date: Sun, 16 Mar 2025 10:46:49 +0100 Subject: [PATCH] Compat with old Qt versions --- cockatrice/src/client/tabs/tab_supervisor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_supervisor.cpp b/cockatrice/src/client/tabs/tab_supervisor.cpp index 7d946f713..3a740afdf 100644 --- a/cockatrice/src/client/tabs/tab_supervisor.cpp +++ b/cockatrice/src/client/tabs/tab_supervisor.cpp @@ -251,9 +251,9 @@ void TabSupervisor::closeEvent(QCloseEvent *event) // Close the game tabs in order to make sure they store their layout. QSet gameTabsToRemove; - for (auto [tabId, tab] : gameTabs.asKeyValueRange()) { - if (tab->close()) { - gameTabsToRemove.insert(tabId); + for (auto it = gameTabs.keyValueBegin(), end = gameTabs.keyValueEnd(); it != end; ++it) { + if (it->second->close()) { + gameTabsToRemove.insert(it->first); } else { event->ignore(); }