mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user