From: Ryan Lortie Date: Fri, 20 Jan 2012 20:31:17 +0000 (-0500) Subject: codegen: Do not use g_object_class_override_property X-Git-Tag: 0.14.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adc290deb17cf0c796eebe00201572e23696433e;p=thirdparty%2Fvala.git codegen: Do not use g_object_class_override_property Instead, always install our own new property with what we believe the correct type is. This avoids a problem with libgee providing properties on some classes that implement two interfaces having the same property name with different types. Fixes bug 666728. --- diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala index 6c70119fe..baa42560d 100644 --- a/codegen/valagobjectmodule.vala +++ b/codegen/valagobjectmodule.vala @@ -139,21 +139,12 @@ public class Vala.GObjectModule : GTypeModule { ccode.add_statement (new CCodeComment (prop.comment.content)); } - if (prop.overrides || prop.base_interface_property != null) { - var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_override_property")); - cinst.add_argument (ccall); - cinst.add_argument (new CCodeConstant (get_ccode_upper_case_name (prop))); - cinst.add_argument (get_property_canonical_cconstant (prop)); - - ccode.add_expression (cinst); - } else { - var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_install_property")); - cinst.add_argument (ccall); - cinst.add_argument (new CCodeConstant (get_ccode_upper_case_name (prop))); - cinst.add_argument (get_param_spec (prop)); - - ccode.add_expression (cinst); - } + var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_install_property")); + cinst.add_argument (ccall); + cinst.add_argument (new CCodeConstant (get_ccode_upper_case_name (prop))); + cinst.add_argument (get_param_spec (prop)); + + ccode.add_expression (cinst); } }