diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 19:21:36 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-21 19:21:36 +0200 |
commit | 55a6e4ac0b610d720393425c8b6597c5c56a782f (patch) | |
tree | 6fb85b5d080b46f348eff9c637c2552ffb3b4202 /Libraries/LibGUI | |
parent | 7b5342b2e301ad75f3c88c617680d2c29ae332ce (diff) | |
download | serenity-55a6e4ac0b610d720393425c8b6597c5c56a782f.zip |
LibGUI: Convert GFrame to ObjectPtr
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/GFilePicker.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/GFrame.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibGUI/GFilePicker.cpp b/Libraries/LibGUI/GFilePicker.cpp index d4ebc80320..5e18087fe4 100644 --- a/Libraries/LibGUI/GFilePicker.cpp +++ b/Libraries/LibGUI/GFilePicker.cpp @@ -192,7 +192,7 @@ GFilePicker::GFilePicker(Mode mode, const StringView& file_name, const StringVie } }; - auto* preview_container = new GFrame(horizontal_container); + auto preview_container = GFrame::construct(horizontal_container); preview_container->set_size_policy(SizePolicy::Fixed, SizePolicy::Fill); preview_container->set_preferred_size(180, 0); preview_container->set_frame_shape(FrameShape::Container); diff --git a/Libraries/LibGUI/GFrame.h b/Libraries/LibGUI/GFrame.h index 7ce5c0ac1d..8cfbca7ee6 100644 --- a/Libraries/LibGUI/GFrame.h +++ b/Libraries/LibGUI/GFrame.h @@ -6,7 +6,6 @@ class GFrame : public GWidget { C_OBJECT(GFrame) public: - explicit GFrame(GWidget* parent = nullptr); virtual ~GFrame() override; int frame_thickness() const { return m_thickness; } @@ -22,6 +21,7 @@ public: Rect frame_inner_rect() const { return frame_inner_rect_for_size(size()); } protected: + explicit GFrame(GWidget* parent = nullptr); void paint_event(GPaintEvent&) override; private: |