mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Other: GUI Tester supports the 3 states of user (Signed out/Locked/Connected).
This commit is contained in:
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user