After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589310 - private setter should not result in G_PARAM_WRITABLE
private setter should not result in G_PARAM_WRITABLE
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: general
0.7.x
Other All
: Normal minor
: ---
Assigned To: Jürg Billeter
Vala maintainers
Depends on:
Blocks: 589311
 
 
Reported: 2009-07-22 00:38 UTC by Maciej (Matthew) Piechotka
Modified: 2009-08-01 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maciej (Matthew) Piechotka 2009-07-22 00:38:06 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:
Comment 1 Jürg Billeter 2009-08-01 16:29:41 UTC
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.