diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-16 22:35:17 +0300 |
commit | b3d17866a3c5700b52c2b0b954fce132a52c1dbf (patch) | |
tree | 7ba07c98a1842eb766de35e172f559dcf5ac6fb4 /src/gui/windows/registerdialog.cpp | |
parent | 5e8e53f6e795a84ab5ca6cfe0d08672878044707 (diff) | |
download | manaverse-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.gz manaverse-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.bz2 manaverse-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.tar.xz manaverse-b3d17866a3c5700b52c2b0b954fce132a52c1dbf.zip |
Convert State enum into strong typed.
Diffstat (limited to 'src/gui/windows/registerdialog.cpp')
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 373a0f118..4c19ce01d 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -286,7 +286,7 @@ void RegisterDialog::action(const ActionEvent &event) mLoginData->email = mEmailField->getText(); mLoginData->registerLogin = true; - client->setState(STATE_REGISTER_ATTEMPT); + client->setState(State::REGISTER_ATTEMPT); } } } @@ -319,12 +319,12 @@ bool RegisterDialog::canSubmit() const return !mUserField->getText().empty() && !mPasswordField->getText().empty() && !mConfirmField->getText().empty() && - client->getState() == STATE_REGISTER && + client->getState() == State::REGISTER && (!mEmailField || !mEmailField->getText().empty()); } void RegisterDialog::close() { - client->setState(STATE_LOGIN); + client->setState(State::LOGIN); Window::close(); } |