From b3d17866a3c5700b52c2b0b954fce132a52c1dbf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Nov 2015 22:35:17 +0300 Subject: Convert State enum into strong typed. --- src/gui/windows/logindialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/windows/logindialog.cpp') diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 93bf10bc3..aebe962cb 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -216,7 +216,7 @@ void LoginDialog::action(const ActionEvent &event) { prepareUpdate(); mLoginData->registerLogin = false; - client->setState(STATE_LOGIN_ATTEMPT); + client->setState(State::LOGIN_ATTEMPT); } else if (eventId == "server") { @@ -227,7 +227,7 @@ void LoginDialog::action(const ActionEvent &event) if (loginHandler->isRegistrationEnabled()) { prepareUpdate(); - client->setState(STATE_REGISTER_PREP); + client->setState(State::REGISTER_PREP); } else if (!mLoginData->registerUrl.empty()) { @@ -283,7 +283,7 @@ bool LoginDialog::canSubmit() const { return !mUserField->getText().empty() && !mPassField->getText().empty() && - client->getState() == STATE_LOGIN; + client->getState() == State::LOGIN; } void LoginDialog::prepareUpdate() @@ -354,6 +354,6 @@ void LoginDialog::prepareUpdate() void LoginDialog::close() { - client->setState(STATE_SWITCH_SERVER); + client->setState(State::SWITCH_SERVER); Window::close(); } -- cgit v1.2.3-70-g09d2