mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +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:
@@ -73,11 +73,11 @@ String DevicesModel::column_name(int column) const
|
||||
}
|
||||
}
|
||||
|
||||
GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
||||
{
|
||||
ASSERT(is_valid(index));
|
||||
|
||||
if (role == Role::TextAlignment) {
|
||||
if (role == GUI::ModelRole::TextAlignment) {
|
||||
switch (index.column()) {
|
||||
case Column::Device:
|
||||
return Gfx::TextAlignment::CenterLeft;
|
||||
@@ -93,7 +93,7 @@ GUI::Variant DevicesModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
return {};
|
||||
}
|
||||
|
||||
if (role == Role::Display) {
|
||||
if (role == GUI::ModelRole::Display) {
|
||||
const DeviceInfo& device = m_devices[index.row()];
|
||||
switch (index.column()) {
|
||||
case Column::Device:
|
||||
|
||||
Reference in New Issue
Block a user