From 1bff29257fa05bf9839583a56f22a1429ea7da73 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 20 Jan 2012 15:31:17 -0500 Subject: [PATCH] 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. --- codegen/valagobjectmodule.vala | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) 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); } } -- 2.47.2