1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:27:43 +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

@ -13,15 +13,17 @@
namespace SystemMonitor {
class ThreadStackWidget final : public GUI::Widget {
C_OBJECT(ThreadStackWidget)
C_OBJECT_ABSTRACT(ThreadStackWidget)
public:
virtual ~ThreadStackWidget() override = default;
static ErrorOr<NonnullRefPtr<ThreadStackWidget>> try_create();
void set_ids(pid_t pid, pid_t tid);
void refresh();
private:
ThreadStackWidget();
ThreadStackWidget() = default;
virtual void show_event(GUI::ShowEvent&) override;
virtual void hide_event(GUI::HideEvent&) override;