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.
This commit is contained in:
Martin Kleusberg
2013-06-12 20:18:51 +02:00
parent 66e41a1846
commit 8947579590

View File

@@ -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 )