LibCore+LibGUI: Remove leftover gunk after Inspector removal

Just some functions in Core::Object and GUI::Widget that aren't called
from anywhere anymore.
This commit is contained in:
Andreas Kling 2023-08-06 16:11:09 +02:00
parent 26647f2b10
commit 887dfd72b9
Notes: sideshowbarker 2024-07-17 02:38:39 +09:00
4 changed files with 0 additions and 43 deletions

View File

@ -192,20 +192,6 @@ bool Object::is_visible_for_timer_purposes() const
return true;
}
void Object::increment_inspector_count(Badge<InspectorServerConnection>)
{
++m_inspector_count;
if (m_inspector_count == 1)
did_begin_inspection();
}
void Object::decrement_inspector_count(Badge<InspectorServerConnection>)
{
--m_inspector_count;
if (!m_inspector_count)
did_end_inspection();
}
void Object::set_event_filter(Function<bool(Core::Event&)> filter)
{
m_event_filter = move(filter);

View File

@ -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<InspectorServerConnection>);
void decrement_inspector_count(Badge<InspectorServerConnection>);
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<NonnullRefPtr<Object>> m_children;
Function<bool(Core::Event&)> m_event_filter;
};

View File

@ -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> 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)

View File

@ -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*);