aboutsummaryrefslogtreecommitdiff
path: root/lib/database.cpp
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-02-12 12:12:24 +0100
committerTobias Fella <fella@posteo.de>2022-02-12 12:12:24 +0100
commitb0aef4af9cbf00755c7b70c71d77f0bf7ce0d200 (patch)
treea583f1b70e15568ebe784b6d6c6bdd3ea7dcbed5 /lib/database.cpp
parent148bb1256fb15c73c605c5301da2b9602f859660 (diff)
downloadlibquotient-b0aef4af9cbf00755c7b70c71d77f0bf7ce0d200.tar.gz
libquotient-b0aef4af9cbf00755c7b70c71d77f0bf7ce0d200.zip
Replace QPair with std::pair
Diffstat (limited to 'lib/database.cpp')
-rw-r--r--lib/database.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/database.cpp b/lib/database.cpp
index 535920e2..b91b6ef1 100644
--- a/lib/database.cpp
+++ b/lib/database.cpp
@@ -160,14 +160,14 @@ UnorderedMap<QString, std::vector<QOlmSessionPtr>> Database::loadOlmSessions(con
return sessions;
}
-UnorderedMap<QPair<QString, QString>, QOlmInboundGroupSessionPtr> Database::loadMegolmSessions(const QString& roomId, const PicklingMode& picklingMode)
+UnorderedMap<std::pair<QString, QString>, QOlmInboundGroupSessionPtr> Database::loadMegolmSessions(const QString& roomId, const PicklingMode& picklingMode)
{
auto query = prepareQuery(QStringLiteral("SELECT * FROM inbound_megolm_sessions WHERE roomId=:roomId;"));
query.bindValue(":roomId", roomId);
transaction();
execute(query);
commit();
- UnorderedMap<QPair<QString, QString>, QOlmInboundGroupSessionPtr> sessions;
+ UnorderedMap<std::pair<QString, QString>, QOlmInboundGroupSessionPtr> sessions;
while (query.next()) {
auto session = QOlmInboundGroupSession::unpickle(query.value("pickle").toByteArray(), picklingMode);
if (std::holds_alternative<QOlmError>(session)) {
@@ -204,7 +204,7 @@ void Database::addGroupSessionIndexRecord(const QString& roomId, const QString&
commit();
}
-QPair<QString, qint64> Database::groupSessionIndexRecord(const QString& roomId, const QString& sessionId, qint64 index)
+std::pair<QString, qint64> Database::groupSessionIndexRecord(const QString& roomId, const QString& sessionId, qint64 index)
{
auto query = prepareQuery(QStringLiteral("SELECT * FROM group_session_record_index WHERE roomId=:roomId AND sessionId=:sessionId AND i=:index;"));
query.bindValue(":roomId", roomId);