Also load SQLite extensions when importing a SQL file into a new DB

When creating a new database file for an SQL import load the default
SQLite extensions - just like it's done when creating a new database the
normal way.
This commit is contained in:
Martin Kleusberg
2013-06-05 21:23:48 +02:00
parent d7c9585982
commit 720ef9bc95

View File

@@ -817,7 +817,7 @@ void MainWindow::importDatabaseFromSQL()
PreferencesDialog::getSettingsValue("db", "defaultlocation").toString(),
tr("Text files(*.sql *.txt);;All files(*)"));
// Cancel when no file doesn't exist
// Cancel when file doesn't exist
if(!QFile::exists(fileName))
return;
@@ -842,6 +842,7 @@ void MainWindow::importDatabaseFromSQL()
}
db.create(newDbFile);
loadExtensionsFromSettings();
}
// Open, read, execute and close file