1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +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:
Karol Kosek 2023-05-21 16:47:34 +02:00 committed by Andreas Kling
parent a5936864d9
commit 412630637a
10 changed files with 96 additions and 71 deletions

View file

@ -12,15 +12,18 @@
namespace SystemMonitor {
class ProcessStateWidget final : public GUI::Widget {
C_OBJECT(ProcessStateWidget);
C_OBJECT_ABSTRACT(ProcessStateWidget);
public:
virtual ~ProcessStateWidget() override = default;
static ErrorOr<NonnullRefPtr<ProcessStateWidget>> try_create();
void set_pid(pid_t);
private:
ProcessStateWidget();
ProcessStateWidget() = default;
RefPtr<GUI::TableView> m_table_view;
};