Simplify closeSupplementaryWindows for QPointer use
This commit is contained in:
parent
5cf07c7f91
commit
ae1c7e8d9a
1 changed files with 7 additions and 28 deletions
|
@ -2833,34 +2833,13 @@ bool MainWindow::initRegionMapEditor(bool silent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeSupplementaryWindows() {
|
void MainWindow::closeSupplementaryWindows() {
|
||||||
if (this->tilesetEditor) {
|
delete this->tilesetEditor;
|
||||||
delete this->tilesetEditor;
|
delete this->regionMapEditor;
|
||||||
this->tilesetEditor = nullptr;
|
delete this->mapImageExporter;
|
||||||
}
|
delete this->newMapPrompt;
|
||||||
if (this->regionMapEditor) {
|
delete this->shortcutsEditor;
|
||||||
delete this->regionMapEditor;
|
delete this->projectSettingsEditor;
|
||||||
this->regionMapEditor = nullptr;
|
delete this->customScriptsEditor;
|
||||||
}
|
|
||||||
if (this->mapImageExporter) {
|
|
||||||
delete this->mapImageExporter;
|
|
||||||
this->mapImageExporter = nullptr;
|
|
||||||
}
|
|
||||||
if (this->newMapPrompt) {
|
|
||||||
delete this->newMapPrompt;
|
|
||||||
this->newMapPrompt = nullptr;
|
|
||||||
}
|
|
||||||
if (this->shortcutsEditor) {
|
|
||||||
delete this->shortcutsEditor;
|
|
||||||
this->shortcutsEditor = nullptr;
|
|
||||||
}
|
|
||||||
if (this->projectSettingsEditor) {
|
|
||||||
delete this->projectSettingsEditor;
|
|
||||||
this->projectSettingsEditor = nullptr;
|
|
||||||
}
|
|
||||||
if (this->customScriptsEditor) {
|
|
||||||
delete this->customScriptsEditor;
|
|
||||||
this->customScriptsEditor = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||||
|
|
Loading…
Reference in a new issue