[glib/revert-de57914b] Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"




commit d41b5bf99961f9259c99be6471343660b7342901
Author: Sebastian Dröge <slomo coaxion net>
Date:   Tue Sep 13 11:20:03 2022 +0000

    Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"
    
    This reverts merge request !2888

 gobject/gobject.c                     |  20 ++-
 gobject/tests/deprecated-properties.c | 257 ----------------------------------
 gobject/tests/meson.build             |   1 -
 3 files changed, 8 insertions(+), 270 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 18ec2368b1..f743e589ad 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1766,8 +1766,7 @@ static inline void
 object_set_property (GObject             *object,
                     GParamSpec          *pspec,
                     const GValue        *value,
-                    GObjectNotifyQueue  *nqueue,
-                    gboolean             user_specified)
+                    GObjectNotifyQueue  *nqueue)
 {
   GTypeInstance *inst = (GTypeInstance *) object;
   GObjectClass *class;
@@ -1783,8 +1782,7 @@ object_set_property (GObject             *object,
 
   param_spec_follow_override (&pspec);
 
-  if (user_specified)
-    consider_issuing_property_deprecation_warning (pspec);
+  consider_issuing_property_deprecation_warning (pspec);
 
   pclass = G_PARAM_SPEC_GET_CLASS (pspec);
   if (g_value_type_compatible (G_VALUE_TYPE (value), pspec->value_type) &&
@@ -2204,7 +2202,7 @@ g_object_new_with_custom_constructor (GObjectClass          *class,
   /* set remaining properties */
   for (i = 0; i < n_params; i++)
     if (!(params[i].pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
-      object_set_property (object, params[i].pspec, params[i].value, nqueue, TRUE);
+      object_set_property (object, params[i].pspec, params[i].value, nqueue);
 
   /* If nqueue is non-NULL then we are frozen.  Thaw it. */
   if (nqueue)
@@ -2254,7 +2252,6 @@ g_object_new_internal (GObjectClass          *class,
           const GValue *value;
           GParamSpec *pspec;
           guint j;
-          gboolean user_specified = FALSE;
 
           pspec = node->data;
           value = NULL; /* to silence gcc... */
@@ -2263,14 +2260,13 @@ g_object_new_internal (GObjectClass          *class,
             if (params[j].pspec == pspec)
               {
                 value = params[j].value;
-                user_specified = TRUE;
                 break;
               }
 
           if (value == NULL)
             value = g_param_spec_get_default_value (pspec);
 
-          object_set_property (object, pspec, value, nqueue, user_specified);
+          object_set_property (object, pspec, value, nqueue);
         }
     }
 
@@ -2283,7 +2279,7 @@ g_object_new_internal (GObjectClass          *class,
    */
   for (i = 0; i < n_params; i++)
     if (!(params[i].pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
-      object_set_property (object, params[i].pspec, params[i].value, nqueue, TRUE);
+      object_set_property (object, params[i].pspec, params[i].value, nqueue);
 
   if (nqueue)
     g_object_notify_queue_thaw (object, nqueue);
@@ -2614,7 +2610,7 @@ g_object_constructor (GType                  type,
          GParamSpec *pspec = construct_params->pspec;
 
          construct_params++;
-         object_set_property (object, pspec, value, nqueue, TRUE);
+         object_set_property (object, pspec, value, nqueue);
        }
       g_object_notify_queue_thaw (object, nqueue);
       /* the notification queue is still frozen from g_object_init(), so
@@ -2702,7 +2698,7 @@ g_object_setv (GObject       *object,
       if (!g_object_set_is_valid_property (object, pspec, names[i]))
         break;
 
-      object_set_property (object, pspec, &values[i], nqueue, TRUE);
+      object_set_property (object, pspec, &values[i], nqueue);
     }
 
   if (nqueue)
@@ -2760,7 +2756,7 @@ g_object_set_valist (GObject       *object,
          break;
        }
 
-      object_set_property (object, pspec, &value, nqueue, TRUE);
+      object_set_property (object, pspec, &value, nqueue);
 
       /* We open-code g_value_unset() here to avoid the
        * cost of looking up the GTypeValueTable again.
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index c3fc29f6b5..58cf4ab1f7 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -42,7 +42,6 @@ gobject_tests = {
     'source' : ['defaultiface.c', 'testmodule.c'],
   },
   'deftype' : {},
-  'deprecated-properties' : {},
   'dynamictype' : {
     'source' : ['dynamictype.c', 'testmodule.c'],
   },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]