1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 07:55:07 +00:00

LibCore: Convert CFile to ObjectPtr

This commit is contained in:
Andreas Kling 2019-09-21 20:50:06 +02:00
parent 31b38ed88f
commit 8d550c174e
30 changed files with 135 additions and 134 deletions

View file

@ -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) {