mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:32:43 +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:
		
							parent
							
								
									a44e52cc14
								
							
						
					
					
						commit
						f5d920eb2e
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -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 {}; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling