mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibCore: Convert CFile to ObjectPtr
This commit is contained in:
parent
31b38ed88f
commit
8d550c174e
Notes:
sideshowbarker
2024-07-19 12:00:53 +09:00
Author: https://github.com/awesomekling
Commit: 8d550c174e
30 changed files with 135 additions and 134 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue