Fixed bug when opening another database file.

This commit is contained in:
2016-01-17 21:31:50 +01:00
parent 6c3c616786
commit bf812b4d01
+2
View File
@@ -70,6 +70,7 @@ void Context::openDb(const QString &path)
{
if (m_db != NULL) {
delete m_db;
m_solved.clear();
m_dbOpened = false;
}
@@ -177,6 +178,7 @@ void Context::createSchema(IPlugin *plugin, const QSqlDatabase &db, const QMap<Q
if (!schemaMap.contains(plugin->pluginId()) || i >= ver)
{
QString sql = plugin->schemas()[i];
sql = sql.trimmed();
QSqlQuery q(db);
QStringList sqlList = sql.split(";");