mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 08:52:15 -07:00
send closeRequest
This commit is contained in:
parent
b4d7b2cd22
commit
941c40c4cf
1 changed files with 8 additions and 11 deletions
|
|
@ -304,30 +304,27 @@ void TabSupervisor::stop()
|
||||||
tabAdmin = 0;
|
tabAdmin = 0;
|
||||||
tabLog = 0;
|
tabLog = 0;
|
||||||
|
|
||||||
for (const auto tab : deckEditorTabs) {
|
QList<Tab *> tabsToDelete;
|
||||||
disconnect(tab, nullptr, this, nullptr);
|
|
||||||
tab->deleteLater();
|
|
||||||
}
|
|
||||||
deckEditorTabs.clear();
|
|
||||||
|
|
||||||
for (auto i = roomTabs.cbegin(), end = roomTabs.cend(); i != end; ++i) {
|
for (auto i = roomTabs.cbegin(), end = roomTabs.cend(); i != end; ++i) {
|
||||||
disconnect(i.value(), nullptr, this, nullptr);
|
tabsToDelete << i.value();
|
||||||
i.value()->deleteLater();
|
|
||||||
}
|
}
|
||||||
roomTabs.clear();
|
roomTabs.clear();
|
||||||
|
|
||||||
for (auto i = gameTabs.cbegin(), end = gameTabs.cend(); i != end; ++i) {
|
for (auto i = gameTabs.cbegin(), end = gameTabs.cend(); i != end; ++i) {
|
||||||
disconnect(i.value(), nullptr, this, nullptr);
|
tabsToDelete << i.value();
|
||||||
i.value()->deleteLater();
|
|
||||||
}
|
}
|
||||||
gameTabs.clear();
|
gameTabs.clear();
|
||||||
|
|
||||||
for (const auto tab : replayTabs) {
|
for (const auto tab : replayTabs) {
|
||||||
disconnect(tab, nullptr, this, nullptr);
|
tabsToDelete << tab;
|
||||||
tab->deleteLater();
|
|
||||||
}
|
}
|
||||||
replayTabs.clear();
|
replayTabs.clear();
|
||||||
|
|
||||||
|
for (const auto tab : tabsToDelete) {
|
||||||
|
tab->closeRequest(true);
|
||||||
|
}
|
||||||
|
|
||||||
delete userInfo;
|
delete userInfo;
|
||||||
userInfo = 0;
|
userInfo = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue