Create unique database connections per thread and remove them using the database connection name from the QSqlDatabase instance being used.

This commit is contained in:
Luis Ángel San Martín
2018-04-24 20:53:24 +02:00
parent 0ff7da1d2c
commit 52c76d5482
7 changed files with 84 additions and 69 deletions

View File

@ -198,7 +198,7 @@ void LibraryCreator::run()
_database.commit();
_database.close();
QSqlDatabase::removeDatabase(_target);
QSqlDatabase::removeDatabase(_database.databaseName());
//si estabamos en modo creación, se está añadiendo una librería que ya existía y se ha actualizado antes de añadirse.
if(!partialUpdate)
{