From 247717431d4f92ef15284a15c5e814d538d1a452 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 28 Mar 2021 11:25:40 +0200 Subject: [PATCH] LibGUI: Make GUI::Widget::event() protected --- Userland/Applications/Spreadsheet/SpreadsheetView.cpp | 2 +- Userland/Libraries/LibGUI/Widget.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp index 1f3bf0ae9aa..377a30b60ac 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp @@ -204,7 +204,7 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet) auto delegate = make(*m_sheet); delegate->on_cursor_key_pressed = [this](auto& event) { m_table_view->stop_editing(); - m_table_view->event(event); + m_table_view->dispatch_event(event); }; return delegate; }; diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index 29101862474..9528dab9af2 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -148,11 +148,6 @@ public: bool updates_enabled() const { return m_updates_enabled; } void set_updates_enabled(bool); - virtual void event(Core::Event&) override; - - // This is called after children have been painted. - virtual void second_paint_event(PaintEvent&); - Gfx::IntRect relative_rect() const { return m_relative_rect; } Gfx::IntPoint relative_position() const { return m_relative_rect.location(); } @@ -310,6 +305,11 @@ public: protected: Widget(); + virtual void event(Core::Event&) override; + + // This is called after children have been painted. + virtual void second_paint_event(PaintEvent&); + virtual void custom_layout() { } virtual void did_change_font() { } virtual void did_layout() { }