]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Do not use g_object_class_override_property
authorRyan Lortie <desrt@desrt.ca>
Fri, 20 Jan 2012 20:31:17 +0000 (15:31 -0500)
committerJürg Billeter <j@bitron.ch>
Tue, 31 Jan 2012 13:02:29 +0000 (14:02 +0100)
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

index 6c70119fe0c84edf4af99f2403c9bed80b8b4273..baa42560dd4b4a56561d530e7fb2b5f8675f2e9f 100644 (file)
@@ -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);
                }
        }