GNOME Bugzilla – Bug 589310
private setter should not result in G_PARAM_WRITABLE
Last modified: 2009-08-01 16:29:41 UTC
Please describe the problem: If I define private-writable property it is marked in GObject as G_PARAM_WRITABLE. Steps to reproduce: public class Test<T> : GLib.Object { public int i {get; private set;} public void j() { i = 2; } } Actual results: 1. g_object_class_install_property (G_OBJECT_CLASS (klass), TEST_I, g_param_spec_int ("i", "i", "i", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); 2. gint test_get_i (Test* self); in header for public Expected results: 1. g_object_class_install_property (G_OBJECT_CLASS (klass), TEST_I, g_param_spec_int ("i", "i", "i", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); 2. gint test_get_i (Test* self); in header for public 3. When set from within class it should send notify Does this happen every time? Other information:
commit c070d47030d7497a441416507e1b1c243c8426ab Author: Jürg Billeter <j@bitron.ch> Date: Sat Aug 1 18:28:57 2009 +0200 GObject: Do not use G_PARAM_WRITABLE for private setters Fixes bug 589310.