mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
Profiler: Use SortingProxyModel::set_sort_role()
Use the new API to avoid duplicating code in the RunningProcessesModel.
This commit is contained in:
parent
b85a57ead7
commit
14edd67bcc
2 changed files with 4 additions and 17 deletions
|
@ -115,21 +115,6 @@ 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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue