diff options
author | Tobias Fella <9750016+TobiasFella@users.noreply.github.com> | 2021-12-22 19:13:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 19:13:36 +0100 |
commit | 79841d6add9e60716ec6690cde3bccf952cceada (patch) | |
tree | 253e32d26a7ddd70b1309a61bc52ad083f1655f2 | |
parent | 6b29d759a47012eef74948e72c0d0395eb6bf282 (diff) | |
download | libquotient-79841d6add9e60716ec6690cde3bccf952cceada.tar.gz libquotient-79841d6add9e60716ec6690cde3bccf952cceada.zip |
Apply suggestions from code review
Co-authored-by: Alexey Rusakov <Kitsune-Ral@users.sf.net>
-rw-r--r-- | lib/database.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/database.cpp b/lib/database.cpp index 665b931a..d4365647 100644 --- a/lib/database.cpp +++ b/lib/database.cpp @@ -140,7 +140,7 @@ void Database::saveOlmSession(const QString& senderKey, const QString& sessionId UnorderedMap<QString, std::vector<QOlmSessionPtr>> Database::loadOlmSessions(const PicklingMode& picklingMode) { - QSqlQuery query = prepareQuery(QStringLiteral("SELECT * FROM olm_sessions;")); + auto query = prepareQuery(QStringLiteral("SELECT * FROM olm_sessions;")); transaction(); execute(query); commit(); @@ -189,7 +189,7 @@ void Database::saveMegolmSession(const QString& roomId, const QString& senderKey void Database::addGroupSessionIndexRecord(const QString& roomId, const QString& sessionId, uint32_t index, const QString& eventId, qint64 ts) { - QSqlQuery query = prepareQuery("INSERT INTO group_session_record_index(roomId, sessionId, i, eventId, ts) VALUES(:roomId, :sessionId, :index, :eventId, :ts);"); + auto query = prepareQuery("INSERT INTO group_session_record_index(roomId, sessionId, i, eventId, ts) VALUES(:roomId, :sessionId, :index, :eventId, :ts);"); query.bindValue(":roomId", roomId); query.bindValue(":sessionId", sessionId); query.bindValue(":index", index); |