diff options
Diffstat (limited to 'core/object.cpp')
-rw-r--r-- | core/object.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/object.cpp b/core/object.cpp index a43a9c85b1..cd084a0c4a 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -65,6 +65,7 @@ PropertyInfo::operator Dictionary() const { Dictionary d; d["name"] = name; + d["class_name"] = class_name; d["type"] = type; d["hint"] = hint; d["hint_string"] = hint_string; @@ -82,6 +83,9 @@ PropertyInfo PropertyInfo::from_dict(const Dictionary &p_dict) { if (p_dict.has("name")) pi.name = p_dict["name"]; + if (p_dict.has("class_name")) + pi.class_name = p_dict["class_name"]; + if (p_dict.has("hint")) pi.hint = PropertyHint(int(p_dict["hint"])); @@ -650,7 +654,7 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args, if (p_method == CoreStringNames::get_singleton()->_free) { #ifdef DEBUG_ENABLED - if (cast_to<Reference>()) { + if (Object::cast_to<Reference>(this)) { ERR_EXPLAIN("Can't 'free' a reference."); ERR_FAIL(); return; @@ -896,7 +900,7 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS; return Variant(); } - if (cast_to<Reference>()) { + if (Object::cast_to<Reference>(this)) { r_error.argument = 0; r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; ERR_EXPLAIN("Can't 'free' a reference."); @@ -1468,7 +1472,7 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str Signal::Target target(p_to_object->get_instance_id(), p_to_method); if (s->slot_map.has(target)) { - ERR_EXPLAIN("Signal '" + p_signal + "'' already connected to given method '" + p_to_method + "' in that object."); + ERR_EXPLAIN("Signal '" + p_signal + "' is already connected to given method '" + p_to_method + "' in that object."); ERR_FAIL_COND_V(s->slot_map.has(target), ERR_INVALID_PARAMETER); } |