aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2021-12-22 19:16:49 +0100
committerTobias Fella <fella@posteo.de>2021-12-22 19:16:49 +0100
commit5920f8cf64b60a07ddf73852d6d4f724ab3bb03a (patch)
treef397638dc9a03e07956475a8a848156508a65156 /lib
parent79841d6add9e60716ec6690cde3bccf952cceada (diff)
downloadlibquotient-5920f8cf64b60a07ddf73852d6d4f724ab3bb03a.tar.gz
libquotient-5920f8cf64b60a07ddf73852d6d4f724ab3bb03a.zip
Another improvement
Diffstat (limited to 'lib')
-rw-r--r--lib/database.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/database.cpp b/lib/database.cpp
index d4365647..a5df22af 100644
--- a/lib/database.cpp
+++ b/lib/database.cpp
@@ -202,8 +202,7 @@ void Database::addGroupSessionIndexRecord(const QString& roomId, const QString&
QPair<QString, qint64> Database::groupSessionIndexRecord(const QString& roomId, const QString& sessionId, qint64 index)
{
- QSqlQuery query(database());
- query.prepare(QStringLiteral("SELECT * FROM group_session_record_index WHERE roomId=:roomId AND sessionId=:sessionId AND i=:index;"));
+ auto query = prepareQuery(QStringLiteral("SELECT * FROM group_session_record_index WHERE roomId=:roomId AND sessionId=:sessionId AND i=:index;"));
query.bindValue(":roomId", roomId);
query.bindValue(":sessionId", sessionId);
query.bindValue(":index", index);