mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:57:44 +00:00
VisualBuilder: Avoid unnecessary lambda
This commit is contained in:
parent
c587db387c
commit
1a0c11cea2
1 changed files with 3 additions and 6 deletions
|
@ -154,11 +154,8 @@ static RefPtr<GUI::Widget> build_gwidget(VBWidgetType type, GUI::Widget* parent)
|
|||
RefPtr<GUI::Widget> VBWidgetRegistry::build_gwidget(VBWidget& widget, VBWidgetType type, GUI::Widget* parent, NonnullOwnPtrVector<VBProperty>& properties)
|
||||
{
|
||||
auto gwidget = ::build_gwidget(type, parent);
|
||||
auto add_readonly_property = [&](const String& name, const GUI::Variant& value) {
|
||||
auto property = make<VBProperty>(widget, name, value);
|
||||
property->set_readonly(true);
|
||||
properties.append(move(property));
|
||||
};
|
||||
add_readonly_property("class", to_class_name(type));
|
||||
auto property = make<VBProperty>(widget, "class", to_class_name(type));
|
||||
property->set_readonly(true);
|
||||
properties.append(move(property));
|
||||
return gwidget;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue