mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Close child windows and dialogs with main window
Most child windows should be closed with the main application window otherwise if left open and if making specific modifictions could potentially cause a SIGSEGV. To solve that we mark all custom windows/dialogs with the Qt::WA_QuitOnClose attribute on instance creation. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
233e245b78
commit
880b8394d2
6 changed files with 6 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
SubsurfaceAbout *SubsurfaceAbout::instance()
|
SubsurfaceAbout *SubsurfaceAbout::instance()
|
||||||
{
|
{
|
||||||
static SubsurfaceAbout *self = new SubsurfaceAbout();
|
static SubsurfaceAbout *self = new SubsurfaceAbout();
|
||||||
|
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ void DiveComputerManagementDialog::init()
|
||||||
DiveComputerManagementDialog* DiveComputerManagementDialog::instance()
|
DiveComputerManagementDialog* DiveComputerManagementDialog::instance()
|
||||||
{
|
{
|
||||||
static DiveComputerManagementDialog *self = new DiveComputerManagementDialog();
|
static DiveComputerManagementDialog *self = new DiveComputerManagementDialog();
|
||||||
|
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace DownloadFromDcGlobal{
|
||||||
DownloadFromDCWidget *DownloadFromDCWidget::instance()
|
DownloadFromDCWidget *DownloadFromDCWidget::instance()
|
||||||
{
|
{
|
||||||
static DownloadFromDCWidget *dialog = new DownloadFromDCWidget();
|
static DownloadFromDCWidget *dialog = new DownloadFromDCWidget();
|
||||||
|
dialog->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,6 +298,7 @@ void MainWindow::on_actionYearlyStatistics_triggered()
|
||||||
view->setModel(model);
|
view->setModel(model);
|
||||||
view->setWindowModality(Qt::NonModal);
|
view->setWindowModality(Qt::NonModal);
|
||||||
view->setMinimumWidth(600);
|
view->setMinimumWidth(600);
|
||||||
|
view->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
view->show();
|
view->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
PreferencesDialog* PreferencesDialog::instance()
|
PreferencesDialog* PreferencesDialog::instance()
|
||||||
{
|
{
|
||||||
static PreferencesDialog *dialog = new PreferencesDialog();
|
static PreferencesDialog *dialog = new PreferencesDialog();
|
||||||
|
dialog->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ static gboolean merge_locations_into_dives(void);
|
||||||
SubsurfaceWebServices* SubsurfaceWebServices::instance()
|
SubsurfaceWebServices* SubsurfaceWebServices::instance()
|
||||||
{
|
{
|
||||||
static SubsurfaceWebServices *self = new SubsurfaceWebServices();
|
static SubsurfaceWebServices *self = new SubsurfaceWebServices();
|
||||||
|
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue