mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
g_settings_get: only check for non-copying format string
396d40af
introduced a redundant call to g_variant_check_format_string().
Checking whether the format string copies all values is enough.
https://bugzilla.gnome.org/show_bug.cgi?id=719979
This commit is contained in:
parent
05f36e7ffc
commit
0f1579e62c
@ -1528,9 +1528,9 @@ g_settings_get (GSettings *settings,
|
||||
|
||||
value = g_settings_get_value (settings, key);
|
||||
|
||||
if (!g_variant_check_format_string (value, format, TRUE))
|
||||
if (strchr (format, '&'))
|
||||
{
|
||||
g_critical ("%s: invalid format string for key '%s' from schema '%s'. "
|
||||
g_critical ("%s: the format string may not contain '&' (key '%s' from schema '%s'). "
|
||||
"This call will probably stop working with a future version of glib.",
|
||||
G_STRFUNC, key, g_settings_schema_get_id (settings->priv->schema));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user