mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-26 04:02:27 +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:
parent
f6d7204689
commit
a1e381a0f8
Notes:
sideshowbarker
2024-07-19 03:33:11 +09:00
Author: https://github.com/awesomekling
Commit: a1e381a0f8
66 changed files with 201 additions and 167 deletions
|
@ -92,15 +92,15 @@ String RunningProcessesModel::column_name(int column_index) const
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
GUI::Variant RunningProcessesModel::data(const GUI::ModelIndex& index, Role role) const
|
||||
GUI::Variant RunningProcessesModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
||||
{
|
||||
auto& process = m_processes[index.row()];
|
||||
|
||||
if (role == Role::Custom) {
|
||||
if (role == ModelRole::Custom) {
|
||||
return process.pid;
|
||||
}
|
||||
|
||||
if (role == Role::Display) {
|
||||
if (role == ModelRole::Display) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon:
|
||||
if (!process.icon)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue