mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
LibGUI: Make GTableModel a retainable object.
It became clear that this class needs to support multiple owners.
This commit is contained in:
parent
41c744b3c8
commit
f47945759b
22 changed files with 44 additions and 34 deletions
|
@ -3,10 +3,9 @@
|
|||
|
||||
DirectoryTableView::DirectoryTableView(GWidget* parent)
|
||||
: GTableView(parent)
|
||||
, m_model(DirectoryTableModel::create())
|
||||
{
|
||||
auto directory_model = make<DirectoryTableModel>();
|
||||
m_model = directory_model.ptr();
|
||||
set_model(make<GSortingProxyTableModel>(move(directory_model)));
|
||||
set_model(GSortingProxyTableModel::create(m_model.copy_ref()));
|
||||
GTableView::model()->set_key_column_and_sort_order(DirectoryTableModel::Column::Name, GSortOrder::Ascending);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue