浏览代码

SystemMonitor: Simplify executable icon lookup in ProcessModel

Andreas Kling 4 年之前
父节点
当前提交
1c52dc86ee
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      Userland/Applications/SystemMonitor/ProcessModel.cpp

+ 1 - 4
Userland/Applications/SystemMonitor/ProcessModel.cpp

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