diff options
-rw-r--r-- | Applications/DisplayProperties/DisplayProperties.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibGUI/GComboBox.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibGUI/GComboBox.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Applications/DisplayProperties/DisplayProperties.cpp b/Applications/DisplayProperties/DisplayProperties.cpp index 5ccb2f0b13..b37e72f3b9 100644 --- a/Applications/DisplayProperties/DisplayProperties.cpp +++ b/Applications/DisplayProperties/DisplayProperties.cpp @@ -103,7 +103,7 @@ void DisplayPropertiesWidget::create_frame() m_wallpaper_preview = GLabel::construct(background_splitter); - auto* wallpaper_list = new GListView(background_content); + auto wallpaper_list = GListView::construct(background_content); wallpaper_list->set_background_color(Color::White); wallpaper_list->set_model(*ItemListModel<AK::String>::create(m_wallpapers)); wallpaper_list->horizontal_scrollbar().set_visible(false); @@ -124,7 +124,7 @@ void DisplayPropertiesWidget::create_frame() settings_content->set_layout(make<GBoxLayout>(Orientation::Vertical)); settings_content->layout()->set_margins({ 4, 4, 4, 4 }); - auto* resolution_list = new GListView(settings_content); + auto resolution_list = GListView::construct(settings_content); resolution_list->set_background_color(Color::White); resolution_list->set_model(*ItemListModel<Size>::create(m_resolutions)); resolution_list->horizontal_scrollbar().set_visible(false); diff --git a/Libraries/LibGUI/GComboBox.cpp b/Libraries/LibGUI/GComboBox.cpp index e3d0585a18..090f2688d7 100644 --- a/Libraries/LibGUI/GComboBox.cpp +++ b/Libraries/LibGUI/GComboBox.cpp @@ -33,7 +33,7 @@ GComboBox::GComboBox(GWidget* parent) m_list_window->set_window_type(GWindowType::Tooltip); m_list_window->set_should_destroy_on_close(false); - m_list_view = new GListView(nullptr); + m_list_view = GListView::construct(nullptr); m_list_view->horizontal_scrollbar().set_visible(false); m_list_window->set_main_widget(m_list_view); diff --git a/Libraries/LibGUI/GComboBox.h b/Libraries/LibGUI/GComboBox.h index 650a4e6102..72721c2ff8 100644 --- a/Libraries/LibGUI/GComboBox.h +++ b/Libraries/LibGUI/GComboBox.h @@ -39,6 +39,6 @@ private: ObjectPtr<GTextEditor> m_editor; GButton* m_open_button { nullptr }; GWindow* m_list_window { nullptr }; - GListView* m_list_view { nullptr }; + ObjectPtr<GListView> m_list_view; bool m_only_allow_values_from_model { false }; }; |