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

VisualBuilder: Convert Vector<OwnPtr> to NonnullOwnPtrVector.

This commit is contained in:
Andreas Kling 2019-07-24 09:40:11 +02:00
parent 31a2a6ca2d
commit e2798d6208
5 changed files with 17 additions and 15 deletions

View file

@ -89,7 +89,7 @@ Direction VBWidget::grabber_at(const Point& position) const
void VBWidget::for_each_property(Function<void(VBProperty&)> callback)
{
for (auto& it : m_properties) {
callback(*it);
callback(it);
}
}
@ -176,8 +176,8 @@ void VBWidget::setup_properties()
void VBWidget::synchronize_properties()
{
for (auto& prop : m_properties) {
if (prop->m_getter)
prop->m_value = prop->m_getter(*gwidget());
if (prop.m_getter)
prop.m_value = prop.m_getter(*gwidget());
}
m_property_model->update();
@ -186,11 +186,11 @@ void VBWidget::synchronize_properties()
VBProperty& VBWidget::property(const String& name)
{
for (auto& prop : m_properties) {
if (prop->name() == name)
return *prop;
if (prop.name() == name)
return prop;
}
m_properties.append(make<VBProperty>(*this, name, GVariant()));
return *m_properties.last();
return m_properties.last();
}
void VBWidget::property_did_change()