aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-06-07 22:18:20 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-06-07 22:18:20 +0200
commit0b27415a064b956149cef5997626a358bc5a083d (patch)
tree2b6a228358f039aa4b63bea7a4e07a79784c73b3
parent3e3a95f78bcf3c877f179d0f196bb751b68236af (diff)
Fix crash when canceling window close
-rw-r--r--src/mainwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 471933f..e0fbf62 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1728,8 +1728,10 @@ void MainWindow::slotRestart()
void MainWindow::closeEvent(QCloseEvent* event)
{
KXmlGuiWindow::closeEvent(event);
- QApplication::exit(m_exitCode);
- return;
+ if (event->isAccepted()) {
+ QApplication::exit(m_exitCode);
+ return;
+ }
}
void MainWindow::slotUpdateCaptureFolder()