diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-21 22:22:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-21 22:22:47 +0300 |
commit | ba931a717cb5a2549ecdaa1f924dbbf5f896a21b (patch) | |
tree | 3c623bc1ce935c08b749572af439ae4b3b3dbc5b /src/gui/widgets/textfield.cpp | |
parent | 60b40c0c68e9cffbc5f48d4f672d99009488f8b1 (diff) | |
download | plus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.gz plus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.bz2 plus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.xz plus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.zip |
Rename keyEvent variables into event.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r-- | src/gui/widgets/textfield.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index d7d73f78a..d1f19785f 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -245,16 +245,16 @@ int TextField::getValue() const return value; } -void TextField::keyPressed(KeyEvent &keyEvent) +void TextField::keyPressed(KeyEvent &event) { - const int val = keyEvent.getKey().getValue(); + const int val = event.getKey().getValue(); #ifdef USE_SDL2 if (val == Key::TEXTINPUT) { - std::string str = keyEvent.getText(); + std::string str = event.getText(); mText.insert(mCaretPosition, str); mCaretPosition += str.size(); - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -273,7 +273,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) buf[1] = 0; mText.insert(mCaretPosition, std::string(buf)); mCaretPosition += 1; - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -305,7 +305,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) mText.insert(mCaretPosition, std::string(buf, buf + len)); mCaretPosition += len; - keyEvent.consume(); + event.consume(); fixScroll(); if (mSendAlwaysEvents) distributeActionEvent(); @@ -323,14 +323,14 @@ void TextField::keyPressed(KeyEvent &keyEvent) bool consumed(false); #endif - const int action = keyEvent.getActionId(); + const int action = event.getActionId(); if (!inputManager.isActionActive(static_cast<int>( Input::KEY_GUI_CTRL))) { if (!handleNormalKeys(action, consumed)) { if (consumed) - keyEvent.consume(); + event.consume(); return; } } @@ -343,7 +343,7 @@ void TextField::keyPressed(KeyEvent &keyEvent) distributeActionEvent(); if (consumed) - keyEvent.consume(); + event.consume(); fixScroll(); } |