LibCore: Convert CFile to ObjectPtr

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

View file

@ -4,13 +4,13 @@
void GJsonArrayModel::update()
{
CFile file(m_json_path);
if (!file.open(CIODevice::ReadOnly)) {
dbg() << "Unable to open " << file.filename();
auto file = CFile::construct(m_json_path);
if (!file->open(CIODevice::ReadOnly)) {
dbg() << "Unable to open " << file->filename();
return;
}
auto json = JsonValue::from_string(file.read_all());
auto json = JsonValue::from_string(file->read_all());
ASSERT(json.is_array());
m_array = json.as_array();