mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibGUI: Replace uses of JsonObject::get_deprecated()/get_ptr()
This commit is contained in:
@@ -119,12 +119,14 @@ Variant JsonArrayModel::data(ModelIndex const& index, ModelRole role) const
|
||||
|
||||
if (role == ModelRole::Display) {
|
||||
auto& json_field_name = field_spec.json_field_name;
|
||||
auto data = object.get_deprecated(json_field_name);
|
||||
auto data = object.get(json_field_name);
|
||||
if (field_spec.massage_for_display)
|
||||
return field_spec.massage_for_display(object);
|
||||
if (data.is_number())
|
||||
return data;
|
||||
return object.get_deprecated(json_field_name).to_deprecated_string();
|
||||
if (!data.has_value())
|
||||
return "";
|
||||
if (data->is_number())
|
||||
return data.value();
|
||||
return data->to_deprecated_string();
|
||||
}
|
||||
|
||||
if (role == ModelRole::Sort) {
|
||||
|
||||
Reference in New Issue
Block a user