From 8947579590b876263f5083a8ece9dd237f9bab38 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Wed, 12 Jun 2013 20:18:51 +0200 Subject: [PATCH] MainWindow: Remove unneeded code in fileExit() There is no need to check for changes when exiting and showing a message box in the main window as exactly the same code is also run in DBBrowserDB. --- src/MainWindow.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 3aa0e100..62410aa8 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -368,18 +368,7 @@ void MainWindow::fileClose() void MainWindow::fileExit() { - if (db.isOpen()) - { - if (db.getDirty()) - { - QString msg = tr("Do you want to save the changes made to the database file %1?").arg(db.curDBFilename); - if(QMessageBox::question( this, QApplication::applicationName() ,msg, QMessageBox::Yes, QMessageBox::No)==QMessageBox::Yes) - db.saveAll(); - else - db.revertAll(); //not really necessary, I think... but will not hurt. - } - db.close(); - } + db.close(); } void MainWindow::closeEvent( QCloseEvent* event )