diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-26 21:29:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-26 21:29:59 +0300 |
commit | a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (patch) | |
tree | 1b1e98a615e2c03641c99b66cb4667b56f7087c3 /src/gui/changepassworddialog.cpp | |
parent | 012a10fd8153f3ddb775dde1e4dba4456f2aa9de (diff) | |
download | manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.gz manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.bz2 manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.tar.xz manaverse-a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709.zip |
Add const to some classes.
Diffstat (limited to 'src/gui/changepassworddialog.cpp')
-rw-r--r-- | src/gui/changepassworddialog.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp index 5751efba4..0d38bab4e 100644 --- a/src/gui/changepassworddialog.cpp +++ b/src/gui/changepassworddialog.cpp @@ -44,13 +44,13 @@ #include "debug.h" -ChangePasswordDialog::ChangePasswordDialog(LoginData *data): +ChangePasswordDialog::ChangePasswordDialog(LoginData *const data): Window(_("Change Password"), true, nullptr, "changepassword.xml"), mWrongDataNoticeListener(new WrongDataNoticeListener), mLoginData(data) { - gcn::Label *accountLabel = new Label( - strprintf(_("Account: %s"), mLoginData->username.c_str())); + gcn::Label *const accountLabel = new Label( + strprintf(_("Account: %s"), mLoginData->username.c_str())); mOldPassField = new PasswordField; mFirstPassField = new PasswordField; mSecondPassField = new PasswordField; @@ -102,8 +102,10 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event) std::stringstream errorMsg; int error = 0; - unsigned int min = Net::getLoginHandler()->getMinPasswordLength(); - unsigned int max = Net::getLoginHandler()->getMaxPasswordLength(); + const unsigned int min = Net::getLoginHandler() + ->getMinPasswordLength(); + const unsigned int max = Net::getLoginHandler() + ->getMaxPasswordLength(); // Check old Password if (oldPassword.empty()) @@ -142,7 +144,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event) else if (error == 3) mWrongDataNoticeListener->setTarget(this->mSecondPassField); - OkDialog *dlg = new OkDialog(_("Error"), + OkDialog *const dlg = new OkDialog(_("Error"), errorMsg.str(), DIALOG_ERROR); dlg->addActionListener(mWrongDataNoticeListener); } |