1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibGUI: Make GTableModel a retainable object.

It became clear that this class needs to support multiple owners.
This commit is contained in:
Andreas Kling 2019-03-20 03:27:07 +01:00
parent 41c744b3c8
commit f47945759b
22 changed files with 44 additions and 34 deletions

View file

@ -16,7 +16,7 @@ public:
int header_height() const { return m_headers_visible ? 16 : 0; }
int item_height() const { return 16; }
void set_model(OwnPtr<GTableModel>&&);
void set_model(RetainPtr<GTableModel>&&);
GTableModel* model() { return m_model.ptr(); }
const GTableModel* model() const { return m_model.ptr(); }
@ -49,7 +49,7 @@ private:
int column_width(int) const;
void update_content_size();
OwnPtr<GTableModel> m_model;
RetainPtr<GTableModel> m_model;
int m_horizontal_padding { 5 };
bool m_headers_visible { true };
bool m_alternating_row_colors { true };