mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gbinding: warn on failed value transformation
GBinding warned if g_value_transform() returned FALSE, but it didn't warn if there was no transformation available at all. Fix that and test it. https://bugzilla.gnome.org/show_bug.cgi?id=726574
This commit is contained in:
@@ -294,15 +294,15 @@ default_transform (const GValue *value_a,
|
||||
{
|
||||
if (g_value_transform (value_a, value_b))
|
||||
goto done;
|
||||
|
||||
g_warning ("%s: Unable to convert a value of type %s to a "
|
||||
"value of type %s",
|
||||
G_STRLOC,
|
||||
g_type_name (G_VALUE_TYPE (value_a)),
|
||||
g_type_name (G_VALUE_TYPE (value_b)));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_warning ("%s: Unable to convert a value of type %s to a "
|
||||
"value of type %s",
|
||||
G_STRLOC,
|
||||
g_type_name (G_VALUE_TYPE (value_a)),
|
||||
g_type_name (G_VALUE_TYPE (value_b)));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
g_value_copy (value_a, value_b);
|
||||
|
Reference in New Issue
Block a user