mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	LibGUI: Make Menu::add_recent_files_list() infallible
This commit is contained in:
		
							parent
							
								
									f2faf2767f
								
							
						
					
					
						commit
						676ef0cc3d
					
				
					 11 changed files with 20 additions and 21 deletions
				
			
		|  | @ -311,7 +311,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|     file_menu->add_action(delete_action); | ||||
|     file_menu->add_separator(); | ||||
| 
 | ||||
|     TRY(file_menu->add_recent_files_list([&](auto& action) { | ||||
|     file_menu->add_recent_files_list([&](auto& action) { | ||||
|         auto path = action.text(); | ||||
|         auto result = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, path); | ||||
|         if (result.is_error()) | ||||
|  | @ -319,7 +319,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
| 
 | ||||
|         auto value = result.release_value(); | ||||
|         widget->open_file(value.filename(), value.stream()); | ||||
|     })); | ||||
|     }); | ||||
| 
 | ||||
|     file_menu->add_action(quit_action); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling