1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibGUI: Convert GWindow to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 18:34:06 +02:00
parent 70412c7d4f
commit 7584480f62
25 changed files with 37 additions and 37 deletions

View file

@ -28,7 +28,7 @@ GComboBox::GComboBox(GWidget* parent)
open();
};
m_list_window = new GWindow(this);
m_list_window = GWindow::construct(this);
// FIXME: This is obviously not a tooltip window, but it's the closest thing to what we want atm.
m_list_window->set_window_type(GWindowType::Tooltip);
m_list_window->set_should_destroy_on_close(false);

View file

@ -38,7 +38,7 @@ protected:
private:
ObjectPtr<GTextEditor> m_editor;
GButton* m_open_button { nullptr };
GWindow* m_list_window { nullptr };
ObjectPtr<GWindow> m_list_window;
ObjectPtr<GListView> m_list_view;
bool m_only_allow_values_from_model { false };
};

View file

@ -24,7 +24,6 @@ enum class GStandardCursor {
class GWindow : public CObject {
C_OBJECT(GWindow)
public:
GWindow(CObject* parent = nullptr);
virtual ~GWindow() override;
static GWindow* from_window_id(int);
@ -135,6 +134,7 @@ public:
virtual void save_to(AK::JsonObject&) override;
protected:
GWindow(CObject* parent = nullptr);
virtual void wm_event(GWMEvent&);
private: