1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

LibCore: Remove Core::Object::is_widget() in favor of RTTI

This commit is contained in:
Andreas Kling 2021-01-01 16:02:16 +01:00
parent 42179715c3
commit 7841528cd4
4 changed files with 7 additions and 11 deletions

View file

@ -40,9 +40,8 @@ IntrusiveList<Object, &Object::m_all_objects_list_node>& Object::all_objects()
return objects;
}
Object::Object(Object* parent, bool is_widget)
Object::Object(Object* parent)
: m_parent(parent)
, m_widget(is_widget)
{
all_objects().append(*this);
if (m_parent)

View file

@ -117,8 +117,6 @@ public:
void deferred_invoke(Function<void(Object&)>);
bool is_widget() const { return m_widget; }
void save_to(AK::JsonObject&);
bool set_property(const StringView& name, const JsonValue& value);
@ -151,7 +149,7 @@ public:
void decrement_inspector_count(Badge<RPCClient>);
protected:
explicit Object(Object* parent = nullptr, bool is_widget = false);
explicit Object(Object* parent = nullptr);
void register_property(const String& name, Function<JsonValue()> getter, Function<bool(const JsonValue&)> setter = nullptr);
@ -169,7 +167,6 @@ private:
String m_name;
int m_timer_id { 0 };
unsigned m_inspector_count { 0 };
bool m_widget { false };
HashMap<String, NonnullOwnPtr<Property>> m_properties;
NonnullRefPtrVector<Object> m_children;
};