mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 05:25:50 +03:00
SyncJournalDB, clear all the queries before closing the database
This commit is contained in:
parent
16c078963b
commit
aaf16ff0e8
2 changed files with 6 additions and 0 deletions
|
@ -457,6 +457,8 @@ void SyncJournalDb::close()
|
|||
|
||||
_getFileRecordQuery.reset(0);
|
||||
_setFileRecordQuery.reset(0);
|
||||
_setFileRecordChecksumQuery.reset(0);
|
||||
_setFileRecordMetadataQuery.reset(0);
|
||||
_getDownloadInfoQuery.reset(0);
|
||||
_setDownloadInfoQuery.reset(0);
|
||||
_deleteDownloadInfoQuery.reset(0);
|
||||
|
@ -468,6 +470,8 @@ void SyncJournalDb::close()
|
|||
_getErrorBlacklistQuery.reset(0);
|
||||
_setErrorBlacklistQuery.reset(0);
|
||||
_getSelectiveSyncListQuery.reset(0);
|
||||
_getChecksumTypeIdQuery.reset(0);
|
||||
_insertChecksumTypeQuery.reset(0);
|
||||
|
||||
_db.close();
|
||||
_avoidReadFromDbOnNextSyncFilter.clear();
|
||||
|
|
|
@ -166,6 +166,8 @@ private:
|
|||
QString _dbFile;
|
||||
QMutex _mutex; // Public functions are protected with the mutex.
|
||||
int _transaction;
|
||||
|
||||
// NOTE! when adding a query, don't forget to reset it in SyncJournalDb::close
|
||||
QScopedPointer<SqlQuery> _getFileRecordQuery;
|
||||
QScopedPointer<SqlQuery> _setFileRecordQuery;
|
||||
QScopedPointer<SqlQuery> _setFileRecordChecksumQuery;
|
||||
|
|
Loading…
Reference in a new issue