mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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()
|
||||
{
|
||||
static SubsurfaceAbout *self = new SubsurfaceAbout();
|
||||
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ void DiveComputerManagementDialog::init()
|
|||
DiveComputerManagementDialog* DiveComputerManagementDialog::instance()
|
||||
{
|
||||
static DiveComputerManagementDialog *self = new DiveComputerManagementDialog();
|
||||
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace DownloadFromDcGlobal{
|
|||
DownloadFromDCWidget *DownloadFromDCWidget::instance()
|
||||
{
|
||||
static DownloadFromDCWidget *dialog = new DownloadFromDCWidget();
|
||||
dialog->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,6 +298,7 @@ void MainWindow::on_actionYearlyStatistics_triggered()
|
|||
view->setModel(model);
|
||||
view->setWindowModality(Qt::NonModal);
|
||||
view->setMinimumWidth(600);
|
||||
view->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
view->show();
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
PreferencesDialog* PreferencesDialog::instance()
|
||||
{
|
||||
static PreferencesDialog *dialog = new PreferencesDialog();
|
||||
dialog->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ static gboolean merge_locations_into_dives(void);
|
|||
SubsurfaceWebServices* SubsurfaceWebServices::instance()
|
||||
{
|
||||
static SubsurfaceWebServices *self = new SubsurfaceWebServices();
|
||||
self->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue