1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibGUI: Use Object::remove_all_children() in BreadcrumbBar (#4580)

This commit is contained in:
dantje 2020-12-27 23:07:10 +01:00 committed by GitHub
parent d1891f67ac
commit d1366b660e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,11 +57,7 @@ BreadcrumbBar::~BreadcrumbBar()
void BreadcrumbBar::clear_segments()
{
m_segments.clear();
// FIXME: Should Core::Object have something like "remove_all_children()" perhaps?
auto children = this->children();
for (auto& child : children)
child.remove_from_parent();
remove_all_children();
}
void BreadcrumbBar::append_segment(const String& text, const Gfx::Bitmap* icon, const String& data)