mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 01:20:12 +01:00
libnm: use G_PARAM_EXPLICIT_NOTIFY for direct strv properties
For doing this, it's important to review that no set_property() implementation exists, which now would miss to emit the notification.
This commit is contained in:
parent
ebb8602729
commit
37cb6885f7
3 changed files with 12 additions and 10 deletions
|
|
@ -6201,6 +6201,7 @@ set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *ps
|
|||
nm_strvarray_add(priv->dns_options.arr, str);
|
||||
}
|
||||
}
|
||||
_notify(NM_SETTING_IP_CONFIG(object), PROP_DNS_OPTIONS);
|
||||
break;
|
||||
case PROP_ADDRESSES:
|
||||
g_ptr_array_unref(priv->addresses);
|
||||
|
|
@ -6337,7 +6338,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
"",
|
||||
"",
|
||||
G_TYPE_STRV,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns-options:
|
||||
|
|
@ -6376,7 +6377,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
"",
|
||||
"",
|
||||
G_TYPE_STRV,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:dns-priority:
|
||||
|
|
@ -6804,7 +6805,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
|||
"",
|
||||
"",
|
||||
G_TYPE_STRV,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
/**
|
||||
* NMSettingIPConfig:auto-route-ext-gw:
|
||||
|
|
|
|||
|
|
@ -857,12 +857,12 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p
|
|||
\
|
||||
G_STATIC_ASSERT(!NM_FLAGS_ANY((param_flags), ~(NM_SETTING_PARAM_FUZZY_IGNORE))); \
|
||||
\
|
||||
_param_spec = \
|
||||
g_param_spec_boxed("" prop_name "", \
|
||||
"", \
|
||||
"", \
|
||||
G_TYPE_STRV, \
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | (param_flags)); \
|
||||
_param_spec = g_param_spec_boxed("" prop_name "", \
|
||||
"", \
|
||||
"", \
|
||||
G_TYPE_STRV, \
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY \
|
||||
| G_PARAM_STATIC_STRINGS | (param_flags)); \
|
||||
\
|
||||
(obj_properties)[(prop_id)] = _param_spec; \
|
||||
\
|
||||
|
|
|
|||
|
|
@ -4920,7 +4920,8 @@ check_done:;
|
|||
NM_VALUE_TYPE_INT64,
|
||||
NM_VALUE_TYPE_UINT64,
|
||||
NM_VALUE_TYPE_STRING,
|
||||
NM_VALUE_TYPE_BYTES);
|
||||
NM_VALUE_TYPE_BYTES,
|
||||
NM_VALUE_TYPE_STRV);
|
||||
|
||||
if (NM_FLAGS_HAS(sip->param_spec->flags, G_PARAM_EXPLICIT_NOTIFY)) {
|
||||
g_assert(expected);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue