mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 03:04:05 +02: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:
@@ -1144,7 +1144,13 @@ pspec_compare_id (gconstpointer a,
|
|||||||
{
|
{
|
||||||
const GParamSpec *pspec1 = a, *pspec2 = b;
|
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*
|
static inline GSList*
|
||||||
|
Reference in New Issue
Block a user