mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:15:06 +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:
parent
fb09b6a8ce
commit
028c011760
46 changed files with 1035 additions and 1039 deletions
|
@ -40,21 +40,21 @@ ProcessStateWidget::ProcessStateWidget()
|
|||
|
||||
set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
||||
auto pid_label_label = add<GUI::Label>("Process:");
|
||||
pid_label_label->set_font(Gfx::Font::default_bold_font());
|
||||
auto& pid_label_label = add<GUI::Label>("Process:");
|
||||
pid_label_label.set_font(Gfx::Font::default_bold_font());
|
||||
m_pid_label = add<GUI::Label>("");
|
||||
|
||||
auto state_label_label = add<GUI::Label>("State:");
|
||||
state_label_label->set_font(Gfx::Font::default_bold_font());
|
||||
auto& state_label_label = add<GUI::Label>("State:");
|
||||
state_label_label.set_font(Gfx::Font::default_bold_font());
|
||||
m_state_label = add<GUI::Label>("");
|
||||
|
||||
// FIXME: This should show CPU% instead.
|
||||
auto cpu_label_label = add<GUI::Label>("Times scheduled:");
|
||||
cpu_label_label->set_font(Gfx::Font::default_bold_font());
|
||||
auto& cpu_label_label = add<GUI::Label>("Times scheduled:");
|
||||
cpu_label_label.set_font(Gfx::Font::default_bold_font());
|
||||
m_cpu_label = add<GUI::Label>("");
|
||||
|
||||
auto memory_label_label = add<GUI::Label>("Memory (resident):");
|
||||
memory_label_label->set_font(Gfx::Font::default_bold_font());
|
||||
auto& memory_label_label = add<GUI::Label>("Memory (resident):");
|
||||
memory_label_label.set_font(Gfx::Font::default_bold_font());
|
||||
m_memory_label = add<GUI::Label>("");
|
||||
|
||||
m_timer = add<Core::Timer>(500, [this] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue