summaryrefslogtreecommitdiff
path: root/src/gui/changepassworddialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-09 19:43:40 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-09 19:43:40 +0300
commit4484b433abc8f07bcf7d4d22fd946e00b66b078d (patch)
treed8d04c6ea9526b90334e7b0a4abf44e2508a3597 /src/gui/changepassworddialog.cpp
parentc1fb0bf9dc98e2a30f33cbbf4f74604b36efbcba (diff)
downloadmv-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.gz
mv-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.bz2
mv-4484b433abc8f07bcf7d4d22fd946e00b66b078d.tar.xz
mv-4484b433abc8f07bcf7d4d22fd946e00b66b078d.zip
Fix first part of shadow variables/methods errors.
Diffstat (limited to 'src/gui/changepassworddialog.cpp')
-rw-r--r--src/gui/changepassworddialog.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index 30012ae52..56db37ebb 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -46,10 +46,10 @@
#include "debug.h"
-ChangePasswordDialog::ChangePasswordDialog(LoginData *loginData):
+ChangePasswordDialog::ChangePasswordDialog(LoginData *data):
Window(_("Change Password"), true),
mWrongDataNoticeListener(new WrongDataNoticeListener),
- mLoginData(loginData)
+ mLoginData(data)
{
gcn::Label *accountLabel = new Label(
strprintf(_("Account: %s"), mLoginData->username.c_str()));
@@ -101,7 +101,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
logger->log("ChangePasswordDialog::Password change, Username is %s",
username.c_str());
- std::stringstream errorMessage;
+ std::stringstream errorMsg;
int error = 0;
unsigned int min = Net::getLoginHandler()->getMinPasswordLength();
@@ -111,27 +111,27 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
if (oldPassword.empty())
{
// No old password
- errorMessage << _("Enter the old password first.");
+ errorMsg << _("Enter the old password first.");
error = 1;
}
else if (newFirstPass.length() < min)
{
// First password too short
- errorMessage << strprintf(_("The new password needs to be at least"
- " %d characters long."), min);
+ errorMsg << strprintf(_("The new password needs to be at least"
+ " %d characters long."), min);
error = 2;
}
else if (newFirstPass.length() > max - 1 )
{
// First password too long
- errorMessage << strprintf(_("The new password needs to be less "
- "than %d characters long."), max);
+ errorMsg << strprintf(_("The new password needs to be less "
+ "than %d characters long."), max);
error = 2;
}
else if (newFirstPass != newSecondPass)
{
// Second Pass mismatch
- errorMessage << _("The new password entries mismatch.");
+ errorMsg << _("The new password entries mismatch.");
error = 3;
}
@@ -144,7 +144,7 @@ void ChangePasswordDialog::action(const gcn::ActionEvent &event)
else if (error == 3)
mWrongDataNoticeListener->setTarget(this->mSecondPassField);
- OkDialog *dlg = new OkDialog(_("Error"), errorMessage.str());
+ OkDialog *dlg = new OkDialog(_("Error"), errorMsg.str());
dlg->addActionListener(mWrongDataNoticeListener);
}
else