no need to manually null out the tabs anymore

This commit is contained in:
RickyRister 2025-01-11 23:16:46 -08:00
parent 67a969e5f5
commit e18e49d303

View file

@ -311,29 +311,20 @@ void TabSupervisor::stop()
tabLog->closeRequest(true); tabLog->closeRequest(true);
} }
} }
tabUserLists = 0;
tabServer = 0;
tabDeckStorage = 0;
tabReplays = 0;
tabAdmin = 0;
tabLog = 0;
QList<Tab *> tabsToDelete; QList<Tab *> tabsToDelete;
for (auto i = roomTabs.cbegin(), end = roomTabs.cend(); i != end; ++i) { for (auto i = roomTabs.cbegin(), end = roomTabs.cend(); i != end; ++i) {
tabsToDelete << i.value(); tabsToDelete << i.value();
} }
roomTabs.clear();
for (auto i = gameTabs.cbegin(), end = gameTabs.cend(); i != end; ++i) { for (auto i = gameTabs.cbegin(), end = gameTabs.cend(); i != end; ++i) {
tabsToDelete << i.value(); tabsToDelete << i.value();
} }
gameTabs.clear();
for (auto i = messageTabs.cbegin(), end = messageTabs.cend(); i != end; ++i) { for (auto i = messageTabs.cbegin(), end = messageTabs.cend(); i != end; ++i) {
tabsToDelete << i.value(); tabsToDelete << i.value();
} }
messageTabs.clear();
for (const auto tab : tabsToDelete) { for (const auto tab : tabsToDelete) {
tab->closeRequest(true); tab->closeRequest(true);