diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-05-17 10:04:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-05-17 15:46:50 +0200 |
commit | 1d40c4253ece649882b312139e47b65bdff8ab5a (patch) | |
tree | 17cdcfb4d41e278a33a3034748ed3f45086d02d6 /vcl/unx/gtk4 | |
parent | 37ca398665af12711769f825395376772f9e0f2d (diff) |
Avoid loplugin:unreffun
> vcl/unx/gtk4/a11y.cxx:295:1: error: redundant function redeclaration [loplugin:unreffun]
> G_DEFINE_TYPE_WITH_CODE(LoAccessible, lo_accessible, G_TYPE_OBJECT,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/gobject/gtype.h:1730:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE'
> #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/gobject/gtype.h:2213:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN'
> _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/gobject/gtype.h:2160:17: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE'
> static void type_name##_class_init (TypeName##Class *klass); \
> ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> <scratch space>:47:1: note: expanded from here
> lo_accessible_class_init
> ^
> vcl/unx/gtk4/a11y.cxx:236:13: note: previous declaration is here [loplugin:unreffun]
> static void lo_accessible_class_init(LoAccessibleClass* klass)
> ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I22bad5cf5e546d3a4dff4c1de3b3bb06638d1200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151865
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/unx/gtk4')
-rw-r--r-- | vcl/unx/gtk4/a11y.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx index be0c3904783a..09526114cae5 100644 --- a/vcl/unx/gtk4/a11y.cxx +++ b/vcl/unx/gtk4/a11y.cxx @@ -233,20 +233,6 @@ static void lo_accessible_set_property(GObject* object, guint property_id, const } } -static void lo_accessible_class_init(LoAccessibleClass* klass) -{ - GObjectClass* object_class = G_OBJECT_CLASS(klass); - - // object_class->finalize = lo_accessible_finalize; - // object_class->dispose = lo_accessible_dispose; - object_class->get_property = lo_accessible_get_property; - object_class->set_property = lo_accessible_set_property; - // object_class->constructed = lo_accessible_constructed; - - // g_object_class_install_properties(object_class, LAST_CHILD_PROP, lo_accessible_props); - g_object_class_override_property(object_class, PROP_ACCESSIBLE_ROLE, "accessible-role"); -} - static GtkAccessible* lo_accessible_get_accessible_parent(GtkAccessible* accessible) { LoAccessible* lo_accessible = LO_ACCESSIBLE(accessible); @@ -295,6 +281,20 @@ static void lo_accessible_accessible_init(GtkAccessibleInterface* iface) G_DEFINE_TYPE_WITH_CODE(LoAccessible, lo_accessible, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(GTK_TYPE_ACCESSIBLE, lo_accessible_accessible_init)) +static void lo_accessible_class_init(LoAccessibleClass* klass) +{ + GObjectClass* object_class = G_OBJECT_CLASS(klass); + + // object_class->finalize = lo_accessible_finalize; + // object_class->dispose = lo_accessible_dispose; + object_class->get_property = lo_accessible_get_property; + object_class->set_property = lo_accessible_set_property; + // object_class->constructed = lo_accessible_constructed; + + // g_object_class_install_properties(object_class, LAST_CHILD_PROP, lo_accessible_props); + g_object_class_override_property(object_class, PROP_ACCESSIBLE_ROLE, "accessible-role"); +} + static LoAccessible* lo_accessible_new(GdkDisplay* pDisplay, GtkAccessible* pParent, const css::uno::Reference<css::accessibility::XAccessible>& rAccessible) |