mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
gdbus-codegen: Tag interfaces so annotated with G_PARAM_DEPRECATED
If a D-Bus interface was annotated with o.fd.DBus.Deprecated, then the corresponding GObject property, in the common GInterface implemented by the generated GDBusObjectProxies and GDBusObjectSkeletons, to access the generated code for the D-Bus interface 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
52ce05aaa7
commit
53573d98f5
@ -3,7 +3,7 @@
|
||||
|
||||
# GDBus - GLib D-Bus Library
|
||||
#
|
||||
# Copyright (C) 2008-2011 Red Hat, Inc.
|
||||
# Copyright (C) 2008-2018 Red Hat, Inc.
|
||||
# Copyright (C) 2018 Iñigo Martínez <inigomartinez@gmail.com>
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
@ -3061,9 +3061,12 @@ class CodeGenerator:
|
||||
' * Connect to the #GObject::notify signal to get informed of property changes.\n'
|
||||
%(self.namespace, i.name_hyphen, i.camel_name, i.name), False))
|
||||
self.write_gtkdoc_deprecated_and_since_and_close(i, self.outfile, 2)
|
||||
self.outfile.write(' g_object_interface_install_property (iface, g_param_spec_object ("%s", "%s", "%s", %sTYPE_%s, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));\n'
|
||||
flags = 'G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS'
|
||||
if i.deprecated:
|
||||
flags = 'G_PARAM_DEPRECATED | ' + flags
|
||||
self.outfile.write(' g_object_interface_install_property (iface, g_param_spec_object ("%s", "%s", "%s", %sTYPE_%s, %s));\n'
|
||||
'\n'
|
||||
%(i.name_hyphen, i.name_hyphen, i.name_hyphen, self.ns_upper, i.name_upper))
|
||||
%(i.name_hyphen, i.name_hyphen, i.name_hyphen, self.ns_upper, i.name_upper, flags))
|
||||
self.outfile.write('}\n'
|
||||
'\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user