mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Rewrite export to SQL dump
Completely rewrite the code for exporting the entire database to an SQL file. The new code is more concise and should be easier to understand. It also displays a progress bar while exporting the data. Also this change eliminated most compiler warnings.
This commit is contained in:
@@ -879,14 +879,12 @@ void MainWindow::exportDatabaseToSQL()
|
||||
defaultlocation,
|
||||
"Text files(*.sql *.txt)");
|
||||
|
||||
if (fileName.size() > 0)
|
||||
if(fileName.size())
|
||||
{
|
||||
if (!db.dump(fileName))
|
||||
{
|
||||
QMessageBox::warning( this, QApplication::applicationName(), "Could not create export file." );
|
||||
} else {
|
||||
QMessageBox::information( this, QApplication::applicationName(), "Export completed." );
|
||||
}
|
||||
if(!db.dump(fileName))
|
||||
QMessageBox::warning(this, QApplication::applicationName(), "Export cancelled or failed.");
|
||||
else
|
||||
QMessageBox::information(this, QApplication::applicationName(), "Export completed.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user