[PATCH] Quit Subsurface with yearly stats window in front

Miika Turkia miika.turkia at gmail.com
Fri Apr 25 07:59:32 PDT 2014


Add ability to quit Subsurface with a Ctrl-Q shortcut even if the yearly
statistics window is active.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 qt-ui/mainwindow.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 003f924..5bc89c1 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -442,6 +442,8 @@ void MainWindow::on_actionYearlyStatistics_triggered()
 		connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close()));
 		closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), yearlyStats);
 		connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close()));
+		QShortcut* quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), yearlyStats);
+		connect(quitKey, SIGNAL(activated()), this, SLOT(close()));
 	}
 	/* problem here is that without more MainWindow variables or a separate YearlyStatistics
 	 * class the user needs to close the window/widget and re-open it for it to update.
-- 
1.8.3.2



More information about the subsurface mailing list