1
Fork 0
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:
Andreas Kling 2020-07-04 19:22:30 +02:00
parent b85a57ead7
commit 14edd67bcc
2 changed files with 4 additions and 17 deletions

View file

@ -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 {};
}