summaryrefslogtreecommitdiff
path: root/src/gui/unregisterdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-29 23:40:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-29 23:40:41 +0300
commit1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (patch)
tree68fe26fdd1ef25645deef894c296b6fbc80b0e13 /src/gui/unregisterdialog.cpp
parent41044107cc0a17125ebd806c9934b6eb636dafe6 (diff)
downloadmanaplus-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.gz
manaplus-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.bz2
manaplus-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.xz
manaplus-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.zip
Add const to more classes.
Diffstat (limited to 'src/gui/unregisterdialog.cpp')
-rw-r--r--src/gui/unregisterdialog.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index 5e1850daa..6464ce7e7 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -44,14 +44,14 @@
#include "debug.h"
-UnRegisterDialog::UnRegisterDialog(LoginData *data):
+UnRegisterDialog::UnRegisterDialog(LoginData *const data):
Window(_("Unregister"), true, nullptr, "unregister.xml"),
mWrongDataNoticeListener(new WrongDataNoticeListener),
mLoginData(data)
{
- gcn::Label *userLabel = new Label(strprintf(_("Name: %s"), mLoginData->
- username.c_str()));
- gcn::Label *passwordLabel = new Label(_("Password:"));
+ gcn::Label *const userLabel = new Label(strprintf(_("Name: %s"),
+ mLoginData->username.c_str()));
+ gcn::Label *const passwordLabel = new Label(_("Password:"));
mPasswordField = new PasswordField(mLoginData->password);
mUnRegisterButton = new Button(_("Unregister"), "unregister", this);
mCancelButton = new Button(_("Cancel"), "cancel", this);
@@ -109,8 +109,10 @@ void UnRegisterDialog::action(const gcn::ActionEvent &event)
std::stringstream errorMsg;
bool error = false;
- 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 password
if (password.length() < min)
@@ -132,7 +134,7 @@ void UnRegisterDialog::action(const gcn::ActionEvent &event)
{
mWrongDataNoticeListener->setTarget(this->mPasswordField);
- OkDialog *dlg = new OkDialog(_("Error"),
+ OkDialog *const dlg = new OkDialog(_("Error"),
errorMsg.str(), DIALOG_ERROR);
dlg->addActionListener(mWrongDataNoticeListener);
}