Other: fIxed GUI Tester to comply with latest gRPC changes.

This commit is contained in:
Xavier Michelon
2023-01-06 07:20:53 +01:00
parent 16aaa1b050
commit 700836aea0
10 changed files with 128 additions and 125 deletions

View File

@ -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_;
}