diff options
author | Tobias Fella <fella@posteo.de> | 2022-02-12 12:12:24 +0100 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2022-02-12 12:12:24 +0100 |
commit | b0aef4af9cbf00755c7b70c71d77f0bf7ce0d200 (patch) | |
tree | a583f1b70e15568ebe784b6d6c6bdd3ea7dcbed5 /lib/database.cpp | |
parent | 148bb1256fb15c73c605c5301da2b9602f859660 (diff) | |
download | libquotient-b0aef4af9cbf00755c7b70c71d77f0bf7ce0d200.tar.gz libquotient-b0aef4af9cbf00755c7b70c71d77f0bf7ce0d200.zip |
Replace QPair with std::pair
Diffstat (limited to 'lib/database.cpp')
-rw-r--r-- | lib/database.cpp | 6 |
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); |