mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:22:45 +00:00 
			
		
		
		
	LibGUI+DevTools+Applications: Use ModelIndex::data() in many places
This way you don't have to keep track of which model it came from.
This commit is contained in:
		
							parent
							
								
									96f98b1fc9
								
							
						
					
					
						commit
						9102b624ac
					
				
					 18 changed files with 56 additions and 57 deletions
				
			
		|  | @ -142,7 +142,7 @@ Locator::~Locator() | |||
| void Locator::open_suggestion(const GUI::ModelIndex& index) | ||||
| { | ||||
|     auto filename_index = m_suggestion_view->model()->index(index.row(), LocatorSuggestionModel::Column::Name); | ||||
|     auto filename = m_suggestion_view->model()->data(filename_index, GUI::ModelRole::Display).to_string(); | ||||
|     auto filename = filename_index.data().to_string(); | ||||
|     open_file(filename); | ||||
|     close(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling