Finish is already called in the destructor

This commit is contained in:
Hannah von Reth 2021-01-18 14:51:33 +01:00 committed by Matthieu Gallien (Rebase PR Action)
parent d60eb67c2e
commit f977a54694
2 changed files with 3 additions and 6 deletions

View file

@ -161,10 +161,10 @@ public:
const QByteArray &lastQuery() const;
int numRowsAffected();
void reset_and_clear_bindings();
void finish();
private:
void bindValueInternal(int pos, const QVariant &value);
void finish();
SqlDatabase *_sqldb = nullptr;
sqlite3 *_db = nullptr;
@ -172,6 +172,8 @@ private:
QString _error;
int _errId;
QByteArray _sql;
friend class SqlDatabase;
};
} // namespace OCC

View file

@ -396,10 +396,7 @@ bool SyncJournalDb::checkConnect()
&& createQuery.errorId() == SQLITE_IOERR
&& sqlite3_extended_errcode(_db.sqliteDb()) == SQLITE_IOERR_SHMMAP) {
qCWarning(lcDb) << "IO error SHMMAP on table creation, attempting with DELETE journal mode";
_journalMode = "DELETE";
createQuery.finish();
pragma1.finish();
commitTransaction();
_db.close();
return checkConnect();
@ -1864,8 +1861,6 @@ QVector<SyncJournalDb::PollInfo> SyncJournalDb::getPollInfos()
info._url = query.stringValue(3);
res.append(info);
}
query.finish();
return res;
}