diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp index 9b1a0a6e7..8007664d5 100644 --- a/runtime/BrowserWindow.cpp +++ b/runtime/BrowserWindow.cpp @@ -174,13 +174,20 @@ BrowserWindow::~BrowserWindow() // Save the window geometry on close void BrowserWindow::closeEvent(QCloseEvent *event) { - QSettings settings; - settings.setValue("Browser/Geometry", saveGeometry()); - settings.setValue("Browser/WindowState", saveState()); - QMainWindow::closeEvent(event); + if (QMessageBox::Yes == QMessageBox::question(this, "Exit the application?", "Are you sure you want to exit the application?", QMessageBox::Yes | QMessageBox::No)) + { + QSettings settings; + settings.setValue("Browser/Geometry", saveGeometry()); + settings.setValue("Browser/WindowState", saveState()); + QMainWindow::closeEvent(event); + event->accept(); + } + else + { + event->ignore(); + } } - // Create the actions for the window void BrowserWindow::createActions() {