mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:12:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			415 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			415 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "Icon.h"
 | |
| #include "StringUtils.h"
 | |
| #include <LibCore/Resource.h>
 | |
| 
 | |
| namespace Ladybird {
 | |
| 
 | |
| QIcon load_icon_from_uri(StringView uri)
 | |
| {
 | |
|     auto resource = MUST(Core::Resource::load_from_uri(uri));
 | |
|     auto path = qstring_from_ak_string(resource->filesystem_path());
 | |
| 
 | |
|     return QIcon { path };
 | |
| }
 | |
| 
 | |
| }
 | 
