mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:42:44 +00:00 
			
		
		
		
	LibCore: Convert CFile to ObjectPtr
This commit is contained in:
		
							parent
							
								
									31b38ed88f
								
							
						
					
					
						commit
						8d550c174e
					
				
					 30 changed files with 135 additions and 134 deletions
				
			
		|  | @ -95,11 +95,11 @@ GVariant DevicesModel::data(const GModelIndex& index, Role) const | |||
| 
 | ||||
| void DevicesModel::update() | ||||
| { | ||||
|     CFile proc_devices { "/proc/devices" }; | ||||
|     if (!proc_devices.open(CIODevice::OpenMode::ReadOnly)) | ||||
|     auto proc_devices = CFile::construct("/proc/devices"); | ||||
|     if (!proc_devices->open(CIODevice::OpenMode::ReadOnly)) | ||||
|         ASSERT_NOT_REACHED(); | ||||
| 
 | ||||
|     auto json = JsonValue::from_string(proc_devices.read_all()).as_array(); | ||||
|     auto json = JsonValue::from_string(proc_devices->read_all()).as_array(); | ||||
| 
 | ||||
|     m_devices.clear(); | ||||
|     json.for_each([this](auto& value) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling