Other: GUI Tester supports the 3 states of user (Signed out/Locked/Connected).

This commit is contained in:
Xavier Michelon
2022-11-29 13:05:48 +01:00
parent 2cce1c7b2a
commit a78b2dee46
7 changed files with 143 additions and 63 deletions

View File

@ -326,4 +326,19 @@ void User::setTotalBytes(float totalBytes)
}
//****************************************************************************************************************************************************
/// \param[in] state The user state.
/// \return A string describing the state.
//****************************************************************************************************************************************************
QString User::stateToString(UserState state)
{
switch (state) {
case UserState::SignedOut: return "Signed out";
case UserState::Locked: return "Locked";
case UserState::Connected: return "Connected";
default: return "Unknown";
}
}
} // namespace bridgepp

View File

@ -66,6 +66,7 @@ class User : public QObject
Q_OBJECT
public: // static member function
static SPUser newUser(QObject *parent); ///< Create a new user
static QString stateToString(UserState state); ///< Return a string describing a user state.
public: // member functions.
User(User const &) = delete; ///< Disabled copy-constructor.