mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
If a D-Bus interface has a property that's annotated with o.fd.DBus.Deprecated, then the corresponding GObject property was not being marked with G_PARAM_DEPRECATED, even though the gtk-doc snippet had the 'Deprecated: ' tag. G_PARAM_DEPRECATED is older than gdbus-codegen, 2.26 and 2.30 respectively, hence it can be used unconditionally. https://gitlab.gnome.org/GNOME/glib/merge_requests/485
This commit is contained in:
parent
b660a67cb3
commit
52ce05aaa7
@ -1523,7 +1523,10 @@ class CodeGenerator:
|
||||
s = 'g_param_spec_boxed ("%s", "%s", "%s", G_TYPE_STRV'%(p.name_hyphen, p.name, p.name)
|
||||
else:
|
||||
print_error('Unsupported gtype "{}" for GParamSpec'.format(p.arg.gtype))
|
||||
self.outfile.write(' %s, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));'%s);
|
||||
flags = 'G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS'
|
||||
if p.deprecated:
|
||||
flags = 'G_PARAM_DEPRECATED | ' + flags
|
||||
self.outfile.write(' %s, %s));'%(s, flags));
|
||||
self.outfile.write('\n')
|
||||
|
||||
self.outfile.write('}\n'
|
||||
|
Loading…
Reference in New Issue
Block a user