mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:15:07 +00:00
LibGUI: Convert GWidget to ObjectPtr
This commit is contained in:
parent
e4e92980a1
commit
ff6ce422dd
41 changed files with 115 additions and 107 deletions
|
@ -8,7 +8,8 @@ public:
|
|||
explicit GStackWidget(GWidget* parent);
|
||||
virtual ~GStackWidget() override;
|
||||
|
||||
GWidget* active_widget() const { return m_active_widget; }
|
||||
GWidget* active_widget() { return m_active_widget.ptr(); }
|
||||
const GWidget* active_widget() const { return m_active_widget.ptr(); }
|
||||
void set_active_widget(GWidget*);
|
||||
|
||||
Function<void(GWidget*)> on_active_widget_change;
|
||||
|
@ -18,5 +19,5 @@ protected:
|
|||
virtual void resize_event(GResizeEvent&) override;
|
||||
|
||||
private:
|
||||
GWidget* m_active_widget { nullptr };
|
||||
ObjectPtr<GWidget> m_active_widget;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue