Commit 1bff2925 authored by Allison Karlitskaya's avatar Allison Karlitskaya Committed by Jürg Billeter

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.
parent 556a22f8
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment