summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-03-11 18:31:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-11 11:25:46 -0700
commitb382228b7dccc8e2c6b4af6ae23e0a285055c454 (patch)
tree8cce1bbb2b7a9dc98cd0ee265236d36d3fffa310 /qt-ui
parent6e4466aa0a349df1b377a3755117b1f7da76e68f (diff)
downloadsubsurface-b382228b7dccc8e2c6b4af6ae23e0a285055c454.tar.gz
MainWindow: close all windows once we close the main one
This is useful if we have more non-modal windows and we want them simply to close with the main one without explicitly creating class member variables to point to such instances. A practical example would be the debug window created in ProfileWidget2() (diveDepthTableView) which holds the depth profile values. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 20f463cf0..ccba66d70 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -651,6 +651,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
}
event->accept();
writeSettings();
+ QApplication::closeAllWindows();
}
DiveListView *MainWindow::dive_list()