diff options
| author | Linus Jahn <lnj@kaidan.im> | 2021-09-30 15:52:59 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2021-09-30 16:11:17 +0200 |
| commit | 77a9a5c76685795376e8acd4d684c30a77192795 (patch) | |
| tree | cf633ee781a5481b78d95181a459d5bd564ff6c2 /src/client | |
| parent | 756be3004d8462b54c743b529f6d808168da1566 (diff) | |
| download | qxmpp-77a9a5c76685795376e8acd4d684c30a77192795.tar.gz | |
TrustStorage: Remove unnecessary const constraint
Some implementations may require non-const access.
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/QXmppTrustMemoryStorage.cpp | 6 | ||||
| -rw-r--r-- | src/client/QXmppTrustMemoryStorage.h | 6 | ||||
| -rw-r--r-- | src/client/QXmppTrustStorage.cpp | 6 | ||||
| -rw-r--r-- | src/client/QXmppTrustStorage.h | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/client/QXmppTrustMemoryStorage.cpp b/src/client/QXmppTrustMemoryStorage.cpp index c6d80179..9228fa6d 100644 --- a/src/client/QXmppTrustMemoryStorage.cpp +++ b/src/client/QXmppTrustMemoryStorage.cpp @@ -127,7 +127,7 @@ QFuture<void> QXmppTrustMemoryStorage::removeOwnKey(const QString &encryption) return makeReadyFuture(); } -QFuture<QString> QXmppTrustMemoryStorage::ownKey(const QString &encryption) const +QFuture<QString> QXmppTrustMemoryStorage::ownKey(const QString &encryption) { auto key = d->ownKeys[encryption]; return makeReadyFuture(std::move(key)); @@ -170,7 +170,7 @@ QFuture<void> QXmppTrustMemoryStorage::removeKeys(const QString &encryption, con return makeReadyFuture(); } -QFuture<QHash<QXmppTrustStorage::TrustLevel, QMultiHash<QString, QString>>> QXmppTrustMemoryStorage::keys(const QString &encryption, const TrustLevels trustLevels) const +QFuture<QHash<QXmppTrustStorage::TrustLevel, QMultiHash<QString, QString>>> QXmppTrustMemoryStorage::keys(const QString &encryption, const TrustLevels trustLevels) { QHash<TrustLevel, QMultiHash<QString, QString>> keys; @@ -231,7 +231,7 @@ QFuture<void> QXmppTrustMemoryStorage::setTrustLevel(const QString &encryption, return makeReadyFuture(); } -QFuture<QXmppTrustStorage::TrustLevel> QXmppTrustMemoryStorage::trustLevel(const QString &encryption, const QString &keyId) const +QFuture<QXmppTrustStorage::TrustLevel> QXmppTrustMemoryStorage::trustLevel(const QString &encryption, const QString &keyId) { const auto processedKeys = d->processedKeys.values(encryption); for (const auto &key : processedKeys) { diff --git a/src/client/QXmppTrustMemoryStorage.h b/src/client/QXmppTrustMemoryStorage.h index eecbaa33..82067b96 100644 --- a/src/client/QXmppTrustMemoryStorage.h +++ b/src/client/QXmppTrustMemoryStorage.h @@ -43,15 +43,15 @@ public: QFuture<void> addOwnKey(const QString &encryption, const QString &keyId) override; QFuture<void> removeOwnKey(const QString &encryption) override; - QFuture<QString> ownKey(const QString &encryption) const override; + QFuture<QString> ownKey(const QString &encryption) override; QFuture<void> addKeys(const QString &encryption, const QString &keyOwnerJid, const QList<QString> &keyIds, TrustLevel trustLevel = TrustLevel::AutomaticallyDistrusted) override; QFuture<void> removeKeys(const QString &encryption = {}, const QList<QString> &keyIds = {}) override; - QFuture<QHash<TrustLevel, QMultiHash<QString, QString>>> keys(const QString &encryption, TrustLevels trustLevels = {}) const override; + QFuture<QHash<TrustLevel, QMultiHash<QString, QString>>> keys(const QString &encryption, TrustLevels trustLevels = {}) override; QFuture<void> setTrustLevel(const QString &encryption, const QMultiHash<QString, QString> &keyIds, const TrustLevel trustLevel) override; QFuture<void> setTrustLevel(const QString &encryption, const QList<QString> &keyOwnerJids, const TrustLevel oldTrustLevel, const TrustLevel newTrustLevel) override; - QFuture<TrustLevel> trustLevel(const QString &encryption, const QString &keyId) const override; + QFuture<TrustLevel> trustLevel(const QString &encryption, const QString &keyId) override; QFuture<void> addKeysForPostponedTrustDecisions(const QString &encryption, const QString &senderKeyId, const QList<QXmppTrustMessageKeyOwner> &keyOwners) override; QFuture<void> removeKeysForPostponedTrustDecisions(const QString &encryption, const QList<QString> &keyIdsForAuthentication, const QList<QString> &keyIdsForDistrusting) override; diff --git a/src/client/QXmppTrustStorage.cpp b/src/client/QXmppTrustStorage.cpp index 16b858c2..51ebea82 100644 --- a/src/client/QXmppTrustStorage.cpp +++ b/src/client/QXmppTrustStorage.cpp @@ -74,7 +74,7 @@ /// /// -/// \fn QXmppTrustStorage::ownKey(const QString &encryption) const +/// \fn QXmppTrustStorage::ownKey(const QString &encryption) /// /// Returns an own key (i.e., the key used by this client instance). /// @@ -107,7 +107,7 @@ /// /// -/// \fn QXmppTrustStorage::keys(const QString &encryption, TrustLevels trustLevels = {}) const +/// \fn QXmppTrustStorage::keys(const QString &encryption, TrustLevels trustLevels = {}) /// /// Returns the JIDs of the key owners mapped to the IDs of their keys with a /// specific trust level. @@ -144,7 +144,7 @@ /// /// -/// \fn QXmppTrustStorage::trustLevel(const QString &encryption, const QString &keyId) const +/// \fn QXmppTrustStorage::trustLevel(const QString &encryption, const QString &keyId) /// /// Returns the trust level of a key. /// diff --git a/src/client/QXmppTrustStorage.h b/src/client/QXmppTrustStorage.h index f1b426b5..2b2dc521 100644 --- a/src/client/QXmppTrustStorage.h +++ b/src/client/QXmppTrustStorage.h @@ -60,15 +60,15 @@ public: virtual QFuture<void> addOwnKey(const QString &encryption, const QString &keyId) = 0; virtual QFuture<void> removeOwnKey(const QString &encryption) = 0; - virtual QFuture<QString> ownKey(const QString &encryption) const = 0; + virtual QFuture<QString> ownKey(const QString &encryption) = 0; virtual QFuture<void> addKeys(const QString &encryption, const QString &keyOwnerJid, const QList<QString> &keyIds, TrustLevel trustLevel = TrustLevel::AutomaticallyDistrusted) = 0; virtual QFuture<void> removeKeys(const QString &encryption = {}, const QList<QString> &keyIds = {}) = 0; - virtual QFuture<QHash<TrustLevel, QMultiHash<QString, QString>>> keys(const QString &encryption, TrustLevels trustLevels = {}) const = 0; + virtual QFuture<QHash<TrustLevel, QMultiHash<QString, QString>>> keys(const QString &encryption, TrustLevels trustLevels = {}) = 0; virtual QFuture<void> setTrustLevel(const QString &encryption, const QMultiHash<QString, QString> &keyIds, TrustLevel trustLevel) = 0; virtual QFuture<void> setTrustLevel(const QString &encryption, const QList<QString> &keyOwnerJids, TrustLevel oldTrustLevel, TrustLevel newTrustLevel) = 0; - virtual QFuture<TrustLevel> trustLevel(const QString &encryption, const QString &keyId) const = 0; + virtual QFuture<TrustLevel> trustLevel(const QString &encryption, const QString &keyId) = 0; virtual QFuture<void> addKeysForPostponedTrustDecisions(const QString &encryption, const QString &senderKeyId, const QList<QXmppTrustMessageKeyOwner> &keyOwners) = 0; virtual QFuture<void> removeKeysForPostponedTrustDecisions(const QString &encryption, const QList<QString> &keyIdsForAuthentication, const QList<QString> &keyIdsForDistrusting) = 0; |
