diff options
author | Dawid Wolosowicz <d@1823.pl> | 2021-09-04 15:08:57 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-09-08 15:48:02 +0430 |
commit | cc93736f21a5aabd5f15f8ad6bbde3f7a0f08f73 (patch) | |
tree | 31db1c3b039b6cb0a0d6183794bd5ba73caa2f91 /Userland | |
parent | b775b1c1995fb52a897cd8b3e6b183c47b71f4fc (diff) | |
download | serenity-cc93736f21a5aabd5f15f8ad6bbde3f7a0f08f73.zip |
LibGUI: Remove barely used AbstractView::is_searching()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractView.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractView.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractView.cpp b/Userland/Libraries/LibGUI/AbstractView.cpp index a1d9c22cf4..7bfc1263f3 100644 --- a/Userland/Libraries/LibGUI/AbstractView.cpp +++ b/Userland/Libraries/LibGUI/AbstractView.cpp @@ -562,7 +562,7 @@ void AbstractView::keydown_event(KeyEvent& event) if (is_searchable()) { if (event.key() == KeyCode::Key_Backspace) { - if (is_searching()) { + if (!m_highlighted_search.is_null()) { //if (event.modifiers() == Mod_Ctrl) { // TODO: delete last word //} @@ -587,7 +587,7 @@ void AbstractView::keydown_event(KeyEvent& event) return; } } else if (event.key() == KeyCode::Key_Escape) { - if (is_searching()) { + if (!m_highlighted_search.is_null()) { stop_highlighted_search_timer(); event.accept(); diff --git a/Userland/Libraries/LibGUI/AbstractView.h b/Userland/Libraries/LibGUI/AbstractView.h index 0995d35a03..0e75a2bd21 100644 --- a/Userland/Libraries/LibGUI/AbstractView.h +++ b/Userland/Libraries/LibGUI/AbstractView.h @@ -162,7 +162,6 @@ protected: void activate_selected(); void update_edit_widget_position(); - bool is_searching() const { return !m_highlighted_search.is_null(); } void stop_highlighted_search_timer(); void start_highlighted_search_timer(); void do_search(String&&); |