|
|
@ -70,6 +70,7 @@ void Context::openDb(const QString &path)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (m_db != NULL) {
|
|
|
|
if (m_db != NULL) {
|
|
|
|
delete m_db;
|
|
|
|
delete m_db;
|
|
|
|
|
|
|
|
m_solved.clear();
|
|
|
|
m_dbOpened = false;
|
|
|
|
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)
|
|
|
|
if (!schemaMap.contains(plugin->pluginId()) || i >= ver)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QString sql = plugin->schemas()[i];
|
|
|
|
QString sql = plugin->schemas()[i];
|
|
|
|
|
|
|
|
sql = sql.trimmed();
|
|
|
|
QSqlQuery q(db);
|
|
|
|
QSqlQuery q(db);
|
|
|
|
|
|
|
|
|
|
|
|
QStringList sqlList = sql.split(";");
|
|
|
|
QStringList sqlList = sql.split(";");
|
|
|
|