mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-09 18:48:34 +00:00
Other: fIxed GUI Tester to comply with latest gRPC changes.
This commit is contained in:
@ -149,6 +149,20 @@ bridgepp::SPUser UserTable::userWithID(QString const &userID) {
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] username The username.
|
||||
/// \return The user with the given username.
|
||||
/// \return A null pointer if the user is not in the list.
|
||||
//****************************************************************************************************************************************************
|
||||
bridgepp::SPUser UserTable::userWithUsername(QString const &username) {
|
||||
QList<SPUser>::const_iterator it = std::find_if(users_.constBegin(), users_.constEnd(), [&username](SPUser const &user) -> bool {
|
||||
return user->username() == username;
|
||||
});
|
||||
|
||||
return it == users_.end() ? nullptr : *it;
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] userID The userID.
|
||||
/// \return the index of the user.
|
||||
@ -200,3 +214,4 @@ bool UserTable::isIndexValid(qint32 index) const {
|
||||
QList<bridgepp::SPUser> UserTable::users() const {
|
||||
return users_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user