Skip to content

Commit

Permalink
Finish is already called in the destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Jan 18, 2021
1 parent 7d11079 commit 4010db8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/common/ownsql.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,19 @@ class OCSYNC_EXPORT SqlQuery
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;
sqlite3_stmt *_stmt = nullptr;
QString _error;
int _errId;
QByteArray _sql;

friend class SqlDatabase;
};

} // namespace OCC
Expand Down
5 changes: 0 additions & 5 deletions src/common/syncjournaldb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,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();
Expand Down Expand Up @@ -1720,8 +1717,6 @@ QVector<SyncJournalDb::PollInfo> SyncJournalDb::getPollInfos()
info._url = query.stringValue(3);
res.append(info);
}

query.finish();
return res;
}

Expand Down

0 comments on commit 4010db8

Please sign in to comment.