From 5920f8cf64b60a07ddf73852d6d4f724ab3bb03a Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 22 Dec 2021 19:16:49 +0100 Subject: Another improvement --- lib/database.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') 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 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); -- cgit v1.2.3