From ba931a717cb5a2549ecdaa1f924dbbf5f896a21b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 21 Mar 2014 22:22:47 +0300 Subject: Rename keyEvent variables into event. --- src/gui/windows/charcreatedialog.cpp | 6 +++--- src/gui/windows/charcreatedialog.h | 2 +- src/gui/windows/charselectdialog.cpp | 18 +++++++++--------- src/gui/windows/charselectdialog.h | 2 +- src/gui/windows/editserverdialog.cpp | 6 +++--- src/gui/windows/editserverdialog.h | 2 +- src/gui/windows/itemamountwindow.cpp | 2 +- src/gui/windows/itemamountwindow.h | 2 +- src/gui/windows/logindialog.cpp | 6 +++--- src/gui/windows/logindialog.h | 2 +- src/gui/windows/quitdialog.cpp | 4 ++-- src/gui/windows/quitdialog.h | 2 +- src/gui/windows/registerdialog.cpp | 6 +++--- src/gui/windows/registerdialog.h | 2 +- src/gui/windows/serverdialog.cpp | 12 ++++++------ src/gui/windows/serverdialog.h | 2 +- src/gui/windows/updaterwindow.cpp | 4 ++-- src/gui/windows/updaterwindow.h | 2 +- src/gui/windows/worldselectdialog.cpp | 4 ++-- src/gui/windows/worldselectdialog.h | 2 +- 20 files changed, 44 insertions(+), 44 deletions(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index 1df282189..53b4b55ff 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -655,13 +655,13 @@ void CharCreateDialog::updatePlayer() } } -void CharCreateDialog::keyPressed(KeyEvent &keyEvent) +void CharCreateDialog::keyPressed(KeyEvent &event) { - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); switch (actionId) { case Input::KEY_GUI_CANCEL: - keyEvent.consume(); + event.consume(); action(ActionEvent(mCancelButton, mCancelButton->getActionEventId())); break; diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h index 6342450ec..652254776 100644 --- a/src/gui/windows/charcreatedialog.h +++ b/src/gui/windows/charcreatedialog.h @@ -78,7 +78,7 @@ class CharCreateDialog final : public Window, void updatePlayer(); - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; private: int getDistributedPoints() const A_WARN_UNUSED; diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 4480f06af..887937232 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -317,20 +317,20 @@ void CharSelectDialog::use(const int selected) } } -void CharSelectDialog::keyPressed(KeyEvent &keyEvent) +void CharSelectDialog::keyPressed(KeyEvent &event) { - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); switch (actionId) { case Input::KEY_GUI_CANCEL: - keyEvent.consume(); + event.consume(); action(ActionEvent(mSwitchLoginButton, mSwitchLoginButton->getActionEventId())); break; case Input::KEY_GUI_RIGHT: { - keyEvent.consume(); + event.consume(); int idx = mCharacterView->getSelected(); if (idx >= 0) { @@ -345,7 +345,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent) case Input::KEY_GUI_LEFT: { - keyEvent.consume(); + event.consume(); int idx = mCharacterView->getSelected(); if (idx >= 0) { @@ -360,7 +360,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent) case Input::KEY_GUI_UP: { - keyEvent.consume(); + event.consume(); int idx = mCharacterView->getSelected(); if (idx >= 0) { @@ -375,7 +375,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent) case Input::KEY_GUI_DOWN: { - keyEvent.consume(); + event.consume(); int idx = mCharacterView->getSelected(); if (idx >= 0) { @@ -390,7 +390,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent) case Input::KEY_GUI_DELETE: { - keyEvent.consume(); + event.consume(); const int idx = mCharacterView->getSelected(); if (idx >= 0 && mCharacterEntries[idx] && mCharacterEntries[idx]->getCharacter()) @@ -402,7 +402,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent) case Input::KEY_GUI_SELECT: { - keyEvent.consume(); + event.consume(); use(mCharacterView->getSelected()); break; } diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h index 38c307f30..cf44f30b9 100644 --- a/src/gui/windows/charselectdialog.h +++ b/src/gui/windows/charselectdialog.h @@ -62,7 +62,7 @@ class CharSelectDialog final : public Window, void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; enum SelectAction { diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 316a7051b..6a25a2d77 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -242,12 +242,12 @@ void EditServerDialog::action(const ActionEvent &event) } } -void EditServerDialog::keyPressed(KeyEvent &keyEvent) +void EditServerDialog::keyPressed(KeyEvent &event) { - if (keyEvent.isConsumed()) + if (event.isConsumed()) return; - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); if (actionId == static_cast(Input::KEY_GUI_CANCEL)) { diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h index b70d1031b..98f5e07fd 100644 --- a/src/gui/windows/editserverdialog.h +++ b/src/gui/windows/editserverdialog.h @@ -59,7 +59,7 @@ class EditServerDialog final : public Window, */ void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; private: TextField *mServerAddressField; diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index ec581a96e..7db944695 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -388,7 +388,7 @@ void ItemAmountWindow::close() scheduleDelete(); } -void ItemAmountWindow::keyReleased(KeyEvent &keyEvent A_UNUSED) +void ItemAmountWindow::keyReleased(KeyEvent &event A_UNUSED) { mItemAmountSlide->setValue(mItemAmountTextField->getValue()); } diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h index 2a414bb24..d2dca064e 100644 --- a/src/gui/windows/itemamountwindow.h +++ b/src/gui/windows/itemamountwindow.h @@ -82,7 +82,7 @@ class ItemAmountWindow final : public Window, */ void close(); - void keyReleased(KeyEvent &keyEvent) override final; + void keyReleased(KeyEvent &event) override final; /** * Creates the dialog, or bypass it if there aren't enough items. diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 71abf153a..4db58e911 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -256,15 +256,15 @@ void LoginDialog::action(const ActionEvent &event) } } -void LoginDialog::keyPressed(KeyEvent &keyEvent) +void LoginDialog::keyPressed(KeyEvent &event) { - if (keyEvent.isConsumed()) + if (event.isConsumed()) { mLoginButton->setEnabled(canSubmit()); return; } - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); if (actionId == static_cast(Input::KEY_GUI_CANCEL)) { action(ActionEvent(nullptr, mServerButton->getActionEventId())); diff --git a/src/gui/windows/logindialog.h b/src/gui/windows/logindialog.h index 7150b62c1..1813e1817 100644 --- a/src/gui/windows/logindialog.h +++ b/src/gui/windows/logindialog.h @@ -71,7 +71,7 @@ class LoginDialog final : public Window, /** * Called when a key is pressed in one of the text fields. */ - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; void close() override final; diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index 98aa70c70..560968311 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -203,9 +203,9 @@ void QuitDialog::action(const ActionEvent &event) scheduleDelete(); } -void QuitDialog::keyPressed(KeyEvent &keyEvent) +void QuitDialog::keyPressed(KeyEvent &event) { - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); int dir = 0; switch (actionId) diff --git a/src/gui/windows/quitdialog.h b/src/gui/windows/quitdialog.h index 8ce60d06c..ffcea4122 100644 --- a/src/gui/windows/quitdialog.h +++ b/src/gui/windows/quitdialog.h @@ -64,7 +64,7 @@ class QuitDialog final : public Window, */ void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; private: void placeOption(ContainerPlacer &placer, diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 50344f223..9c74cbc0d 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -282,14 +282,14 @@ void RegisterDialog::action(const ActionEvent &event) } } -void RegisterDialog::keyPressed(KeyEvent &keyEvent) +void RegisterDialog::keyPressed(KeyEvent &event) { - if (keyEvent.isConsumed()) + if (event.isConsumed()) { mRegisterButton->setEnabled(canSubmit()); return; } - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); if (actionId == static_cast(Input::KEY_GUI_CANCEL)) { action(ActionEvent(nullptr, mCancelButton->getActionEventId())); diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h index 1d5b5e48b..90087b5e2 100644 --- a/src/gui/windows/registerdialog.h +++ b/src/gui/windows/registerdialog.h @@ -87,7 +87,7 @@ class RegisterDialog final : public Window, /** * Called when a key is pressed in one of the text fields. */ - void keyPressed(KeyEvent &keyEvent) override; + void keyPressed(KeyEvent &event) override; void close() override; diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index ec4bbebbb..33b6f1599 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -389,18 +389,18 @@ void ServerDialog::action(const ActionEvent &event) } } -void ServerDialog::keyPressed(KeyEvent &keyEvent) +void ServerDialog::keyPressed(KeyEvent &event) { - switch (keyEvent.getActionId()) + switch (event.getActionId()) { case Input::KEY_GUI_CANCEL: - keyEvent.consume(); + event.consume(); client->setState(STATE_EXIT); return; case Input::KEY_GUI_SELECT: case Input::KEY_GUI_SELECT2: - keyEvent.consume(); + event.consume(); action(ActionEvent(nullptr, mConnectButton->getActionEventId())); return; @@ -435,8 +435,8 @@ void ServerDialog::keyPressed(KeyEvent &keyEvent) default: break; } - if (!keyEvent.isConsumed()) - mServersList->keyPressed(keyEvent); + if (!event.isConsumed()) + mServersList->keyPressed(event); } void ServerDialog::valueChanged(const SelectionEvent &) diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h index 60b84f089..88b6a7caf 100644 --- a/src/gui/windows/serverdialog.h +++ b/src/gui/windows/serverdialog.h @@ -74,7 +74,7 @@ class ServerDialog final : public Window, */ void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; /** * Called when the selected value changed in the servers list box. diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 247ef8707..70af8e7ea 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -292,9 +292,9 @@ void UpdaterWindow::action(const ActionEvent &event) } } -void UpdaterWindow::keyPressed(KeyEvent &keyEvent) +void UpdaterWindow::keyPressed(KeyEvent &event) { - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); if (actionId == static_cast(Input::KEY_GUI_CANCEL)) { action(ActionEvent(nullptr, mCancelButton->getActionEventId())); diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h index 39e1e84f3..4874ba8ba 100644 --- a/src/gui/windows/updaterwindow.h +++ b/src/gui/windows/updaterwindow.h @@ -121,7 +121,7 @@ class UpdaterWindow final : public Window, void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; void logic() override final; diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index 58c1aaee8..963da8f22 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -118,9 +118,9 @@ void WorldSelectDialog::action(const ActionEvent &event) } } -void WorldSelectDialog::keyPressed(KeyEvent &keyEvent) +void WorldSelectDialog::keyPressed(KeyEvent &event) { - const int actionId = keyEvent.getActionId(); + const int actionId = event.getActionId(); if (actionId == static_cast(Input::KEY_GUI_CANCEL)) { diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h index 9d06ac25e..b91beeece 100644 --- a/src/gui/windows/worldselectdialog.h +++ b/src/gui/windows/worldselectdialog.h @@ -65,7 +65,7 @@ class WorldSelectDialog final : public Window, */ void action(const ActionEvent &event) override final; - void keyPressed(KeyEvent &keyEvent) override final; + void keyPressed(KeyEvent &event) override final; private: WorldListModel *mWorldListModel; -- cgit v1.2.3-60-g2f50