[glib/wip/rishi/gdbus-codegen-deprecated: 1/2] gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/rishi/gdbus-codegen-deprecated: 1/2] gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
- Date: Wed, 21 Nov 2018 18:00:29 +0000 (UTC)
commit e01a39bccdb7c9c6f7892408fca781661914447a
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Nov 21 16:05:20 2018 +0100
gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
If a D-Bus interface has a property that's annotated with
org.freedesktop.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.
https://gitlab.gnome.org/GNOME/glib/merge_requests/485
gio/gdbus-2.0/codegen/codegen.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gio/gdbus-2.0/codegen/codegen.py b/gio/gdbus-2.0/codegen/codegen.py
index d393f65cb..e267f8a5e 100644
--- a/gio/gdbus-2.0/codegen/codegen.py
+++ b/gio/gdbus-2.0/codegen/codegen.py
@@ -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'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]