summaryrefslogtreecommitdiff
path: root/src/gui/windows/updaterwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-16 22:35:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-16 22:35:17 +0300
commitb3d17866a3c5700b52c2b0b954fce132a52c1dbf (patch)
tree7ba07c98a1842eb766de35e172f559dcf5ac6fb4 /src/gui/windows/updaterwindow.cpp
parent5e8e53f6e795a84ab5ca6cfe0d08672878044707 (diff)
downloadmanaverse-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/updaterwindow.cpp')
-rw-r--r--src/gui/windows/updaterwindow.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 79dfe29aa..784fd2ad5 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -291,10 +291,10 @@ void UpdaterWindow::enable()
mPlayButton->setEnabled(true);
mPlayButton->requestFocus();
- if (client->getState() != STATE_GAME)
+ if (client->getState() != State::GAME)
{
if (mUpdateType & UpdateType::Close)
- client->setState(STATE_LOAD_DATA);
+ client->setState(State::LOAD_DATA);
}
else
{
@@ -318,8 +318,8 @@ void UpdaterWindow::action(const ActionEvent &event)
}
else if (eventId == "play")
{
- if (client->getState() != STATE_GAME)
- client->setState(STATE_LOAD_DATA);
+ if (client->getState() != State::GAME)
+ client->setState(State::LOAD_DATA);
else
deleteSelf();
}
@@ -331,8 +331,8 @@ void UpdaterWindow::keyPressed(KeyEvent &event)
if (actionId == InputAction::GUI_CANCEL)
{
action(ActionEvent(nullptr, mCancelButton->getActionEventId()));
- if (client->getState() != STATE_GAME)
- client->setState(STATE_LOGIN);
+ if (client->getState() != State::GAME)
+ client->setState(State::LOGIN);
else
deleteSelf();
}
@@ -534,8 +534,8 @@ int UpdaterWindow::updateProgress(void *ptr,
uw->setProgress(progress);
- if ((client->getState() != STATE_UPDATE
- && client->getState() != STATE_GAME)
+ if ((client->getState() != State::UPDATE
+ && client->getState() != State::GAME)
|| uw->mDownloadStatus == UPDATE_ERROR)
{
// If the action was canceled return an error code to stop the mThread