1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibCore: Make Core::Object::add<ChildType> return a ChildType&

Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
This commit is contained in:
Andreas Kling 2020-03-04 19:07:55 +01:00
parent fb09b6a8ce
commit 028c011760
46 changed files with 1035 additions and 1039 deletions

View file

@ -75,9 +75,9 @@ private:
return "Unknown";
}
NonnullRefPtr<GUI::Button> make_button(String, NonnullRefPtr<GUI::Widget>&);
void make_divider(NonnullRefPtr<GUI::Widget>&);
void make_property_value_pairs(const Vector<PropertyValuePair>& pairs, NonnullRefPtr<GUI::Widget>& parent);
GUI::Button& make_button(String, GUI::Widget& parent);
void make_divider(GUI::Widget& parent);
void make_property_value_pairs(const Vector<PropertyValuePair>& pairs, GUI::Widget& parent);
void make_permission_checkboxes(NonnullRefPtr<GUI::Widget>& parent, PermissionMasks, String label_string, mode_t mode);
void permission_changed(mode_t mask, bool set);
bool apply_changes();