mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
Userland: Remove serialize-to-JSON functions only used for Inspector
This commit is contained in:
parent
c756e021a7
commit
3de8dd921e
8 changed files with 0 additions and 112 deletions
|
@ -174,14 +174,6 @@ void Object::deferred_invoke(Function<void()> invokee)
|
|||
Core::deferred_invoke([invokee = move(invokee), strong_this = NonnullRefPtr(*this)] { invokee(); });
|
||||
}
|
||||
|
||||
void Object::save_to(JsonObject& json)
|
||||
{
|
||||
for (auto& it : m_properties) {
|
||||
auto& property = it.value;
|
||||
json.set(property->name(), property->get());
|
||||
}
|
||||
}
|
||||
|
||||
JsonValue Object::property(DeprecatedString const& name) const
|
||||
{
|
||||
auto it = m_properties.find(name);
|
||||
|
|
|
@ -157,8 +157,6 @@ public:
|
|||
|
||||
void deferred_invoke(Function<void()>);
|
||||
|
||||
void save_to(JsonObject&);
|
||||
|
||||
bool set_property(DeprecatedString const& name, JsonValue const& value);
|
||||
JsonValue property(DeprecatedString const& name) const;
|
||||
HashMap<DeprecatedString, NonnullOwnPtr<Property>> const& properties() const { return m_properties; }
|
||||
|
|
|
@ -767,24 +767,6 @@ auto Editor::get_line(DeprecatedString const& prompt) -> Result<DeprecatedString
|
|||
return m_input_error.has_value() ? Result<DeprecatedString, Editor::Error> { m_input_error.value() } : Result<DeprecatedString, Editor::Error> { m_returned_line };
|
||||
}
|
||||
|
||||
void Editor::save_to(JsonObject& object)
|
||||
{
|
||||
Core::Object::save_to(object);
|
||||
object.set("is_searching", m_is_searching);
|
||||
object.set("is_editing", m_is_editing);
|
||||
object.set("cursor_offset", m_cursor);
|
||||
object.set("needs_refresh", m_refresh_needed);
|
||||
object.set("unprocessed_characters", m_incomplete_data.size());
|
||||
object.set("history_size", m_history.size());
|
||||
object.set("current_prompt", m_new_prompt);
|
||||
object.set("was_interrupted", m_was_interrupted);
|
||||
JsonObject display_area;
|
||||
display_area.set("top_left_row", m_origin_row);
|
||||
display_area.set("top_left_column", m_origin_column);
|
||||
display_area.set("line_count", num_lines());
|
||||
object.set("used_display_area", move(display_area));
|
||||
}
|
||||
|
||||
ErrorOr<void> Editor::try_update_once()
|
||||
{
|
||||
if (m_was_interrupted) {
|
||||
|
|
|
@ -266,9 +266,6 @@ private:
|
|||
Retry
|
||||
};
|
||||
|
||||
// FIXME: Port to Core::Property
|
||||
void save_to(JsonObject&);
|
||||
|
||||
ErrorOr<void> try_update_once();
|
||||
void handle_interrupt_event();
|
||||
ErrorOr<void> handle_read_event();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue