diff --git a/Userland/Libraries/LibCore/Object.cpp b/Userland/Libraries/LibCore/Object.cpp index 11ddf67017..2a21f95ccf 100644 --- a/Userland/Libraries/LibCore/Object.cpp +++ b/Userland/Libraries/LibCore/Object.cpp @@ -192,20 +192,6 @@ bool Object::is_visible_for_timer_purposes() const return true; } -void Object::increment_inspector_count(Badge) -{ - ++m_inspector_count; - if (m_inspector_count == 1) - did_begin_inspection(); -} - -void Object::decrement_inspector_count(Badge) -{ - --m_inspector_count; - if (!m_inspector_count) - did_end_inspection(); -} - void Object::set_event_filter(Function filter) { m_event_filter = move(filter); diff --git a/Userland/Libraries/LibCore/Object.h b/Userland/Libraries/LibCore/Object.h index 8c4f470162..28f67fb153 100644 --- a/Userland/Libraries/LibCore/Object.h +++ b/Userland/Libraries/LibCore/Object.h @@ -20,8 +20,6 @@ namespace Core { -class InspectorServerConnection; - enum class TimerShouldFireWhenNotVisible { No = 0, Yes @@ -158,11 +156,6 @@ public: virtual bool is_visible_for_timer_purposes() const; - bool is_being_inspected() const { return m_inspector_count; } - - void increment_inspector_count(Badge); - void decrement_inspector_count(Badge); - protected: explicit Object(Object* parent = nullptr); @@ -174,14 +167,10 @@ protected: // NOTE: You may get child events for children that are not yet fully constructed! virtual void child_event(ChildEvent&); - virtual void did_begin_inspection() { } - virtual void did_end_inspection() { } - private: Object* m_parent { nullptr }; DeprecatedString m_name; int m_timer_id { 0 }; - unsigned m_inspector_count { 0 }; Vector> m_children; Function m_event_filter; }; diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index e99000a118..4cf92795b5 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -415,11 +415,6 @@ void Widget::handle_paint_event(PaintEvent& event) Painter painter(*this); painter.draw_rect(rect(), Color::Red); } - - if (is_being_inspected()) { - Painter painter(*this); - painter.draw_rect(rect(), Color::Magenta); - } } void Widget::set_layout(NonnullRefPtr layout) @@ -1089,16 +1084,6 @@ Gfx::Palette Widget::palette() const return Gfx::Palette(*m_palette); } -void Widget::did_begin_inspection() -{ - update(); -} - -void Widget::did_end_inspection() -{ - update(); -} - void Widget::set_grabbable_margins(Margins const& margins) { if (m_grabbable_margins == margins) diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index da32090cb1..b51cc80a81 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -404,9 +404,6 @@ protected: virtual void screen_rects_change_event(ScreenRectsChangeEvent&); virtual void applet_area_rect_change_event(AppletAreaRectChangeEvent&); - virtual void did_begin_inspection() override; - virtual void did_end_inspection() override; - void show_or_hide_tooltip(); void add_focus_delegator(Widget*);