mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
SystemMonitor: Register MemoryStatsWidget
This also requires that the associated graph widget may be null.
This commit is contained in:
parent
abf2ed4c52
commit
abfddd01d4
3 changed files with 31 additions and 8 deletions
|
@ -212,7 +212,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& refresh_timer = window->add<Core::Timer>(
|
||||
frequency * 1000, [&] {
|
||||
process_model->update();
|
||||
if (auto* memory_stats_widget = MemoryStatsWidget::the())
|
||||
if (auto* memory_stats_widget = SystemMonitor::MemoryStatsWidget::the())
|
||||
memory_stats_widget->refresh();
|
||||
});
|
||||
|
||||
|
@ -746,6 +746,6 @@ NonnullRefPtr<GUI::Widget> build_performance_tab()
|
|||
},
|
||||
});
|
||||
|
||||
graphs_container->add<MemoryStatsWidget>(memory_graph);
|
||||
graphs_container->add<SystemMonitor::MemoryStatsWidget>(&memory_graph);
|
||||
return graphs_container;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue