mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Make ordering for overridden interface properties consistent
g_object_class_list_properties tries to sort the returned list of paramspecs by 'type depth' and param_id. But all the overridden interface properties have a param_id of 0, so they come out in a random order. Bug 628253.
This commit is contained in:
parent
6ddef375c8
commit
c75429d0a0
@ -1144,7 +1144,13 @@ pspec_compare_id (gconstpointer a,
|
||||
{
|
||||
const GParamSpec *pspec1 = a, *pspec2 = b;
|
||||
|
||||
return pspec1->param_id < pspec2->param_id ? -1 : pspec1->param_id > pspec2->param_id;
|
||||
if (pspec1->param_id < pspec2->param_id)
|
||||
return -1;
|
||||
|
||||
if (pspec1->param_id > pspec2->param_id)
|
||||
return 1;
|
||||
|
||||
return strcmp (pspec1->name, pspec2->name);
|
||||
}
|
||||
|
||||
static inline GSList*
|
||||
|
Loading…
Reference in New Issue
Block a user