1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00

LibGUI: Make old register_property a private method of Object

This commit is contained in:
Dan Klishch 2023-11-05 19:29:32 -05:00 committed by Andrew Kaster
parent 1f4b15dcaa
commit 61d82e36b6

View file

@ -58,8 +58,6 @@ public:
protected: protected:
explicit Object(Core::EventReceiver* parent = nullptr); explicit Object(Core::EventReceiver* parent = nullptr);
void register_property(ByteString const& name, Function<JsonValue()> getter, Function<bool(JsonValue const&)> setter = nullptr);
template<typename Getter, typename Deserializer, typename Setter> template<typename Getter, typename Deserializer, typename Setter>
void register_property(StringView name, Getter&& getter, Deserializer&& deserializer, Setter&& setter) void register_property(StringView name, Getter&& getter, Deserializer&& deserializer, Setter&& setter)
{ {
@ -98,6 +96,8 @@ protected:
} }
private: private:
void register_property(ByteString const& name, Function<JsonValue()> getter, Function<bool(JsonValue const&)> setter = nullptr);
HashMap<ByteString, NonnullOwnPtr<Property>> m_properties; HashMap<ByteString, NonnullOwnPtr<Property>> m_properties;
}; };