1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()

This is a preparatory step to making `get()` return `ErrorOr`.
This commit is contained in:
Sam Atkins 2022-12-21 11:42:06 +00:00 committed by Tim Flynn
parent efe4329f9f
commit 1dd6b7f5b7
76 changed files with 671 additions and 671 deletions

View file

@ -83,13 +83,13 @@ int AccessibilityTreeModel::column_count(const GUI::ModelIndex&) const
GUI::Variant AccessibilityTreeModel::data(GUI::ModelIndex const& index, GUI::ModelRole role) const
{
auto const& node = *static_cast<JsonObject const*>(index.internal_data());
auto type = node.get("type"sv).as_string_or("unknown"sv);
auto type = node.get_deprecated("type"sv).as_string_or("unknown"sv);
if (role == GUI::ModelRole::Display) {
if (type == "text")
return node.get("text"sv).as_string();
return node.get_deprecated("text"sv).as_string();
auto node_role = node.get("role"sv).as_string();
auto node_role = node.get_deprecated("role"sv).as_string();
if (type != "element")
return node_role;