diff --git a/Userland/Libraries/LibGUI/JsonArrayModel.cpp b/Userland/Libraries/LibGUI/JsonArrayModel.cpp index 6e75988e4b7..352538ca2e5 100644 --- a/Userland/Libraries/LibGUI/JsonArrayModel.cpp +++ b/Userland/Libraries/LibGUI/JsonArrayModel.cpp @@ -137,7 +137,7 @@ Variant JsonArrayModel::data(ModelIndex const& index, ModelRole role) const if (!data.has_value()) return ""; if (data->is_number()) - return data.value(); + return data->serialized(); return data->as_string(); } diff --git a/Userland/Libraries/LibGUI/Variant.cpp b/Userland/Libraries/LibGUI/Variant.cpp index 516df7312a7..ca0efc349b3 100644 --- a/Userland/Libraries/LibGUI/Variant.cpp +++ b/Userland/Libraries/LibGUI/Variant.cpp @@ -13,54 +13,6 @@ namespace GUI { -Variant::Variant(JsonValue const& value) -{ - *this = value; -} - -Variant& Variant::operator=(JsonValue const& value) -{ - if (value.is_null()) - return *this; - - if (value.is_i32()) { - set(value.as_i32()); - return *this; - } - - if (value.is_u32()) { - set(value.as_u32()); - return *this; - } - - if (value.is_i64()) { - set(value.as_i64()); - return *this; - } - - if (value.is_u64()) { - set(value.as_u64()); - return *this; - } - - if (value.is_double()) { - set(value.as_double()); - return *this; - } - - if (value.is_string()) { - set(value.as_string()); - return *this; - } - - if (value.is_bool()) { - set(Detail::Boolean { value.as_bool() }); - return *this; - } - - VERIFY_NOT_REACHED(); -} - bool Variant::operator==(Variant const& other) const { return visit([&](T const& own_value) { diff --git a/Userland/Libraries/LibGUI/Variant.h b/Userland/Libraries/LibGUI/Variant.h index a99924bb260..5a68292944c 100644 --- a/Userland/Libraries/LibGUI/Variant.h +++ b/Userland/Libraries/LibGUI/Variant.h @@ -29,8 +29,6 @@ public: using Detail::VariantUnderlyingType::Variant; using Detail::VariantUnderlyingType::operator=; - Variant(JsonValue const&); - Variant& operator=(JsonValue const&); Variant(bool v) : Variant(Detail::Boolean { v }) {