mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Fix object leaks in database code
Qt's database and query model requires that both the queries and the database
objects are out of scope before a database connection can safely be removed.
Solution: Properly encapsulate databases and queries in "{ }" and use a string
to cache the connection name for out-of-scope removal.
This commit is contained in:
@ -38,7 +38,7 @@ private:
|
||||
QString _target;
|
||||
QString _sourceFolder; //used for partial updates
|
||||
QStringList _nameFilter;
|
||||
QSqlDatabase _database;
|
||||
QString _databaseConnection;
|
||||
QList<Folder> _currentPathFolders; //lista de folders en el orden en el que están siendo explorados, el último es el folder actual
|
||||
//recursive method
|
||||
void create(QDir currentDirectory);
|
||||
|
||||
Reference in New Issue
Block a user