mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Make sure all queries are initialized on our database object.
Since we use a database with the non default name, we need to do that, otherwise the query is initialized on the default db which is not open in our case.
This commit is contained in:
parent
39e48d3d01
commit
65bd4be16e
1 changed files with 3 additions and 3 deletions
|
@ -684,7 +684,7 @@ void SyncJournalDb::wipeBlacklistEntry( const QString& file )
|
|||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
if( checkConnect() ) {
|
||||
QSqlQuery query;
|
||||
QSqlQuery query(_db);
|
||||
|
||||
query.prepare("DELETE FROM blacklist WHERE path=:path");
|
||||
query.bindValue(":path", file);
|
||||
|
@ -697,7 +697,7 @@ void SyncJournalDb::wipeBlacklistEntry( const QString& file )
|
|||
void SyncJournalDb::updateBlacklistEntry( const SyncJournalBlacklistRecord& item )
|
||||
{
|
||||
QMutexLocker locker(&_mutex);
|
||||
QSqlQuery query;
|
||||
QSqlQuery query(_db);
|
||||
|
||||
if( !checkConnect() ) {
|
||||
return;
|
||||
|
@ -711,7 +711,7 @@ void SyncJournalDb::updateBlacklistEntry( const SyncJournalBlacklistRecord& item
|
|||
return;
|
||||
}
|
||||
|
||||
QSqlQuery iQuery;
|
||||
QSqlQuery iQuery(_db);
|
||||
if( query.next() ) {
|
||||
int retries = query.value(0).toInt();
|
||||
retries--;
|
||||
|
|
Loading…
Reference in a new issue