mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00:00
Profiler: Make the RunningProcessesModel actually sortable
GUI::TableView looks at data(Model::Role::Sort) to know which order things should be in.
This commit is contained in:
@@ -116,6 +116,20 @@ GUI::Variant RunningProcessesModel::data(const GUI::ModelIndex& index, Role role
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
if (role == Role::Sort) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon:
|
||||
return {};
|
||||
case Column::PID:
|
||||
return process.pid;
|
||||
case Column::UID:
|
||||
return process.uid;
|
||||
case Column::Name:
|
||||
return process.name;
|
||||
}
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user