[Libreoffice-commits] core.git: vcl/unx

Arkadiy Illarionov (via logerrit) logerrit at kemper.freedesktop.org
Sat Sep 28 12:24:30 UTC 2019


 vcl/unx/gtk/gloactiongroup.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit efc1d001821747dc72140aeb3e0f0b48b1eed005
Author:     Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Fri Sep 27 00:25:57 2019 +0300
Commit:     Arkadiy Illarionov <qarkai at gmail.com>
CommitDate: Sat Sep 28 14:23:53 2019 +0200

    Use G_ADD_PRIVATE and *_get_instance_private
    
    G_TYPE_INSTANCE_GET_PRIVATE and g_type_class_add_private are deprecated
    
    Change-Id: Id2a03e1ddc523d088682fd29f6b9d4e25f0cd4a2
    Reviewed-on: https://gerrit.libreoffice.org/79663
    Tested-by: Jenkins
    Reviewed-by: Arkadiy Illarionov <qarkai at gmail.com>

diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx
index 73a432769a08..56782e2cd46f 100644
--- a/vcl/unx/gtk/gloactiongroup.cxx
+++ b/vcl/unx/gtk/gloactiongroup.cxx
@@ -112,6 +112,7 @@ static void g_lo_action_group_iface_init (GActionGroupInterface *);
 #endif
 G_DEFINE_TYPE_WITH_CODE (GLOActionGroup,
     g_lo_action_group, G_TYPE_OBJECT,
+    G_ADD_PRIVATE(GLOActionGroup)
     G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP,
                            g_lo_action_group_iface_init));
 #ifdef __GNUC__
@@ -314,9 +315,7 @@ static void
 g_lo_action_group_init (GLOActionGroup *group)
 {
     SAL_INFO("vcl.unity", "g_lo_action_group_init on " << group);
-    group->priv = G_TYPE_INSTANCE_GET_PRIVATE (group,
-                                                 G_TYPE_LO_ACTION_GROUP,
-                                                 GLOActionGroupPrivate);
+    group->priv = static_cast<GLOActionGroupPrivate *>(g_lo_action_group_get_instance_private (group));
     group->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal,
                                                   g_free, g_object_unref);
 }
@@ -327,14 +326,6 @@ g_lo_action_group_class_init (GLOActionGroupClass *klass)
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
     object_class->finalize = g_lo_action_group_finalize;
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-    g_type_class_add_private (klass, sizeof (GLOActionGroupPrivate));
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
 }
 
 static void


More information about the Libreoffice-commits mailing list