mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
SystemMonitor: Convert most widgets to a failable factory
I didn't convert widgets that don't do any failable tasks currently or are lazy-initialized.
This commit is contained in:
parent
a5936864d9
commit
412630637a
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/krkk
Commit: 412630637a
Pull-request: https://github.com/SerenityOS/serenity/pull/18969
10 changed files with 96 additions and 71 deletions
|
@ -12,16 +12,19 @@
|
|||
namespace SystemMonitor {
|
||||
|
||||
class ProcessMemoryMapWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessMemoryMapWidget);
|
||||
C_OBJECT_ABSTRACT(ProcessMemoryMapWidget);
|
||||
|
||||
public:
|
||||
virtual ~ProcessMemoryMapWidget() override = default;
|
||||
|
||||
static ErrorOr<NonnullRefPtr<ProcessMemoryMapWidget>> try_create();
|
||||
|
||||
void set_pid(pid_t);
|
||||
void refresh();
|
||||
|
||||
private:
|
||||
ProcessMemoryMapWidget();
|
||||
ProcessMemoryMapWidget() = default;
|
||||
|
||||
RefPtr<GUI::TableView> m_table_view;
|
||||
RefPtr<GUI::JsonArrayModel> m_json_model;
|
||||
pid_t m_pid { -1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue