summaryrefslogtreecommitdiff
path: root/src/gui/logindialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-13 22:58:01 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-14 01:42:53 +0300
commite40411cdc287343a32a8371f2116fcc11545b466 (patch)
tree4655f02211f1b08b8ead94175fd419c6e766f9c8 /src/gui/logindialog.cpp
parent2ebce73d5018945bb5f5363913a4096e04bf5a0f (diff)
downloadplus-e40411cdc287343a32a8371f2116fcc11545b466.tar.gz
plus-e40411cdc287343a32a8371f2116fcc11545b466.tar.bz2
plus-e40411cdc287343a32a8371f2116fcc11545b466.tar.xz
plus-e40411cdc287343a32a8371f2116fcc11545b466.zip
Improve event.getId() speed.
Diffstat (limited to 'src/gui/logindialog.cpp')
-rw-r--r--src/gui/logindialog.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index 6d349243e..b0015bf46 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -249,17 +249,18 @@ LoginDialog::~LoginDialog()
void LoginDialog::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "login" && canSubmit())
+ const std::string &eventId = event.getId();
+ if (eventId == "login" && canSubmit())
{
prepareUpdate();
mLoginData->registerLogin = false;
Client::setState(STATE_LOGIN_ATTEMPT);
}
- else if (event.getId() == "server")
+ else if (eventId == "server")
{
close();
}
- else if (event.getId() == "register")
+ else if (eventId == "register")
{
if (Net::getLoginHandler()->isRegistrationEnabled())
{
@@ -275,11 +276,11 @@ void LoginDialog::action(const gcn::ActionEvent &event)
confirmDlg->addActionListener(&urlListener);
}
}
- else if (event.getId() == "customhost")
+ else if (eventId == "customhost")
{
mUpdateHostText->setVisible(mCustomUpdateHost->isSelected());
}
- else if (event.getId() == "updateselect")
+ else if (eventId == "updateselect")
{
mCustomUpdateHost->setSelected(false);
mUpdateHostText->setVisible(false);