From 5037f3ac9259d7b7b63f86a0e23c69c4e470d4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 12 Jan 2021 18:41:57 +0100 Subject: [PATCH] Fix data base removal in FolderModel --- YACReaderLibrary/db/folder_model.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/YACReaderLibrary/db/folder_model.cpp b/YACReaderLibrary/db/folder_model.cpp index f454e599..1944e1e1 100644 --- a/YACReaderLibrary/db/folder_model.cpp +++ b/YACReaderLibrary/db/folder_model.cpp @@ -729,10 +729,13 @@ void FolderModelProxy::setupFilteredModelData() QLOG_ERROR() << "Unable to parse query: " << e.what(); } } - QSqlDatabase::removeDatabase(db.connectionName()); + + connectionName = db.connectionName(); endResetModel(); } + + QSqlDatabase::removeDatabase(connectionName); } void FolderModelProxy::clear()