mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
This commit is contained in:
@@ -48,12 +48,12 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
virtual GUI::Variant data(const GUI::ModelIndex& index, Role role = Role::Display) const override
|
||||
virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override
|
||||
{
|
||||
ASSERT(index.is_valid());
|
||||
ASSERT(index.column() == 0);
|
||||
|
||||
if (role == Role::Display)
|
||||
if (role == GUI::ModelRole::Display)
|
||||
return m_file_names.at(index.row());
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user