SystemMonitor: Simplify executable icon lookup in ProcessModel

This commit is contained in:
Andreas Kling 2021-04-11 12:40:39 +02:00
commit 1c52dc86ee
Notes: sideshowbarker 2024-07-18 20:31:33 +09:00

View file

@ -265,10 +265,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
case Column::Icon: {
if (thread.current_state.kernel)
return m_kernel_process_icon;
auto icon = GUI::FileIconProvider::icon_for_executable(thread.current_state.executable).bitmap_for_size(16);
if (!icon)
return GUI::Icon();
return GUI::Icon(*icon);
return GUI::FileIconProvider::icon_for_executable(thread.current_state.executable);
}
case Column::PID:
return thread.current_state.pid;