Clear currently opened database file name when closing database

This avoids possible confusions when getting the currently opened
database file. After closing a database this would return the previously
opened file when in fact no file is opened.

See issue #2334.
This commit is contained in:
Martin Kleusberg
2020-07-18 10:08:17 +02:00
parent 7842f2a1e1
commit 9fcba5a807

View File

@@ -721,6 +721,7 @@ bool DBBrowserDB::close()
if(sqlite3_close(_db) != SQLITE_OK)
qWarning() << tr("Database didn't close correctly, probably still busy");
_db = nullptr;
curDBFilename.clear();
}
schemata.clear();