diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-11-17 09:15:12 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-11-19 16:04:42 +0100 |
commit | 2028fbeae33118cdff6c554dfb2f098150209ff4 (patch) | |
tree | 162bf79cfc282318a84e3aad2f4a13270c5d0595 /Userland/Libraries/LibGUI | |
parent | a6581c2aacbe3f4941168278cb96d94d2b0154a2 (diff) | |
download | serenity-2028fbeae33118cdff6c554dfb2f098150209ff4.zip |
LibGUI: Remove redundant event handling in EmojiInputDialog
The Dialog class already handles closing on escape.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r-- | Userland/Libraries/LibGUI/EmojiInputDialog.cpp | 13 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/EmojiInputDialog.h | 1 |
2 files changed, 0 insertions, 14 deletions
diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp index 36bf933f1e..849177ce4a 100644 --- a/Userland/Libraries/LibGUI/EmojiInputDialog.cpp +++ b/Userland/Libraries/LibGUI/EmojiInputDialog.cpp @@ -19,7 +19,6 @@ #include <LibGUI/Button.h> #include <LibGUI/EmojiInputDialog.h> #include <LibGUI/EmojiInputDialogGML.h> -#include <LibGUI/Event.h> #include <LibGUI/Frame.h> #include <LibGUI/ScrollableContainerWidget.h> #include <LibGUI/TextBox.h> @@ -262,16 +261,4 @@ void EmojiInputDialog::select_first_displayed_emoji() done(ExecResult::OK); } -void EmojiInputDialog::event(Core::Event& event) -{ - if (event.type() == Event::KeyDown) { - auto& key_event = static_cast<KeyEvent&>(event); - if (key_event.key() == Key_Escape) { - done(ExecResult::Cancel); - return; - } - } - Dialog::event(event); -} - } diff --git a/Userland/Libraries/LibGUI/EmojiInputDialog.h b/Userland/Libraries/LibGUI/EmojiInputDialog.h index beb139520c..d31b9f98dd 100644 --- a/Userland/Libraries/LibGUI/EmojiInputDialog.h +++ b/Userland/Libraries/LibGUI/EmojiInputDialog.h @@ -26,7 +26,6 @@ public: String const& selected_emoji_text() const { return m_selected_emoji_text; } private: - virtual void event(Core::Event&) override; explicit EmojiInputDialog(Window* parent_window); Vector<Emoji> supported_emoji(); |