Compat with old Qt versions

This commit is contained in:
Basile Clément 2025-03-16 10:46:49 +01:00
parent 34a855f947
commit 2f33ce9788
No known key found for this signature in database

View file

@ -251,9 +251,9 @@ void TabSupervisor::closeEvent(QCloseEvent *event)
// Close the game tabs in order to make sure they store their layout. // Close the game tabs in order to make sure they store their layout.
QSet<int> gameTabsToRemove; QSet<int> gameTabsToRemove;
for (auto [tabId, tab] : gameTabs.asKeyValueRange()) { for (auto it = gameTabs.keyValueBegin(), end = gameTabs.keyValueEnd(); it != end; ++it) {
if (tab->close()) { if (it->second->close()) {
gameTabsToRemove.insert(tabId); gameTabsToRemove.insert(it->first);
} else { } else {
event->ignore(); event->ignore();
} }