diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 11:03:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 11:03:22 +0300 |
commit | dfaae6f6e804e7779ade870a211a1a14d3a5d9aa (patch) | |
tree | a7652f4e548e166b39a8203e27c890c02c62d5ca /src/gui | |
parent | fd050698f74b5dc7a9867bc93ba6b7c65ef2462f (diff) | |
download | mv-dfaae6f6e804e7779ade870a211a1a14d3a5d9aa.tar.gz mv-dfaae6f6e804e7779ade870a211a1a14d3a5d9aa.tar.bz2 mv-dfaae6f6e804e7779ade870a211a1a14d3a5d9aa.tar.xz mv-dfaae6f6e804e7779ade870a211a1a14d3a5d9aa.zip |
Remove getter for loginHandler.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/changeemaildialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/changepassworddialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/logindialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 14 | ||||
-rw-r--r-- | src/gui/windows/unregisterdialog.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/worldselectdialog.cpp | 2 |
7 files changed, 15 insertions, 26 deletions
diff --git a/src/gui/windows/changeemaildialog.cpp b/src/gui/windows/changeemaildialog.cpp index 84da15ead..408fdf9d4 100644 --- a/src/gui/windows/changeemaildialog.cpp +++ b/src/gui/windows/changeemaildialog.cpp @@ -130,10 +130,8 @@ void ChangeEmailDialog::action(const ActionEvent &event) std::stringstream errorMsg; int error = 0; - const unsigned int min = Net::getLoginHandler() - ->getMinPasswordLength(); - const unsigned int max = Net::getLoginHandler() - ->getMaxPasswordLength(); + const unsigned int min = loginHandler->getMinPasswordLength(); + const unsigned int max = loginHandler->getMaxPasswordLength(); if (newFirstEmail.length() < min) { diff --git a/src/gui/windows/changepassworddialog.cpp b/src/gui/windows/changepassworddialog.cpp index 875fb2c3d..a5f97becb 100644 --- a/src/gui/windows/changepassworddialog.cpp +++ b/src/gui/windows/changepassworddialog.cpp @@ -110,10 +110,8 @@ void ChangePasswordDialog::action(const ActionEvent &event) std::stringstream errorMsg; int error = 0; - const unsigned int min = Net::getLoginHandler() - ->getMinPasswordLength(); - const unsigned int max = Net::getLoginHandler() - ->getMaxPasswordLength(); + const unsigned int min = loginHandler->getMinPasswordLength(); + const unsigned int max = loginHandler->getMaxPasswordLength(); // Check old Password if (oldPassword.empty()) diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 95b3d6cfc..e2211d3fb 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -93,8 +93,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data) : setCloseButton(true); setFocusable(true); - const int optionalActions = Net::getLoginHandler() - ->supportedOptionalActions(); + const int optionalActions = loginHandler->supportedOptionalActions(); ContainerPlacer placer; placer = getPlacer(0, 0); diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index ffcbc8c69..0b642f224 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -193,7 +193,7 @@ void LoginDialog::postInit() mPassField->requestFocus(); mLoginButton->setEnabled(canSubmit()); - mRegisterButton->setEnabled(Net::getLoginHandler()->isRegistrationEnabled() + mRegisterButton->setEnabled(loginHandler->isRegistrationEnabled() || !mLoginData->registerUrl.empty()); } @@ -218,7 +218,7 @@ void LoginDialog::action(const ActionEvent &event) } else if (eventId == "register") { - if (Net::getLoginHandler()->isRegistrationEnabled()) + if (loginHandler->isRegistrationEnabled()) { prepareUpdate(); client->setState(STATE_REGISTER_PREP); diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 7253c3630..5701395a7 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -73,7 +73,7 @@ RegisterDialog::RegisterDialog(LoginData *const data) : { setCloseButton(true); - const int optionalActions = Net::getLoginHandler()-> + const int optionalActions = loginHandler-> supportedOptionalActions(); // TRANSLATORS: register dialog. label. @@ -178,14 +178,10 @@ void RegisterDialog::action(const ActionEvent &event) std::string errorMsg; int error = 0; - const unsigned int minUser = Net::getLoginHandler() - ->getMinUserNameLength(); - const unsigned int maxUser = Net::getLoginHandler() - ->getMaxUserNameLength(); - const unsigned int minPass = Net::getLoginHandler() - ->getMinPasswordLength(); - const unsigned int maxPass = Net::getLoginHandler() - ->getMaxPasswordLength(); + const unsigned int minUser = loginHandler->getMinUserNameLength(); + const unsigned int maxUser = loginHandler->getMaxUserNameLength(); + const unsigned int minPass = loginHandler->getMinPasswordLength(); + const unsigned int maxPass = loginHandler->getMaxPasswordLength(); if (user.length() < minUser) { diff --git a/src/gui/windows/unregisterdialog.cpp b/src/gui/windows/unregisterdialog.cpp index 0135cb7c9..018b583fa 100644 --- a/src/gui/windows/unregisterdialog.cpp +++ b/src/gui/windows/unregisterdialog.cpp @@ -121,10 +121,8 @@ void UnRegisterDialog::action(const ActionEvent &event) std::stringstream errorMsg; bool error = false; - const unsigned int min = Net::getLoginHandler() - ->getMinPasswordLength(); - const unsigned int max = Net::getLoginHandler() - ->getMaxPasswordLength(); + const unsigned int min = loginHandler->getMinPasswordLength(); + const unsigned int max = loginHandler->getMaxPasswordLength(); if (password.length() < min) { diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index db7db88aa..7cfb0319b 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -105,7 +105,7 @@ void WorldSelectDialog::action(const ActionEvent &event) { mChangeLoginButton->setEnabled(false); mChooseWorld->setEnabled(false); - Net::getLoginHandler()->chooseServer(mWorldList->getSelected(), + loginHandler->chooseServer(mWorldList->getSelected(), settings.persistentIp); // Check in case netcode moves us forward |