1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

SystemMonitor: Register MemoryStatsWidget

This also requires that the associated graph widget may be null.
This commit is contained in:
kleines Filmröllchen 2022-03-19 00:19:56 +01:00 committed by Andreas Kling
parent abf2ed4c52
commit abfddd01d4
3 changed files with 31 additions and 8 deletions

View file

@ -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;
}