Skip to content

Commit

Permalink
Deprecate hasKey
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Sep 24, 2022
1 parent f4b49d1 commit 8cb8f69
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
21 changes: 0 additions & 21 deletions src/keys/CompositeKey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,27 +189,6 @@ QSharedPointer<Key> CompositeKey::getKey(const QUuid keyId) const
return {};
}

/**
* Test if a \link Key with the specified ID is
* in the composite key.
*
* @param keyId the ID of the key to detect
*/
bool CompositeKey::hasKey(const QUuid keyId) const
{
for (const QSharedPointer<Key>& key : m_keys) {
if (key->uuid() == keyId) {
return true;
}
}
for (const QSharedPointer<ChallengeResponseKey>& key : m_challengeResponseKeys) {
if (key->uuid() == keyId) {
return true;
}
}
return false;
}

/**
* @return list of Keys which are part of this CompositeKey
*/
Expand Down
1 change: 0 additions & 1 deletion src/keys/CompositeKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CompositeKey : public Key
bool challenge(const QByteArray& seed, QByteArray& result, QString* error = nullptr) const;

void addKey(const QSharedPointer<Key>& key);
bool hasKey(const QUuid keyType) const;
QSharedPointer<Key> getKey(const QUuid keyType) const;
const QList<QSharedPointer<Key>>& keys() const;

Expand Down

0 comments on commit 8cb8f69

Please sign in to comment.