forked from AuroraMiddleware/gtk
Merge branch 'matthiasc/for-master' into 'master'
fix leaks in the testsuite See merge request GNOME/gtk!1231
This commit is contained in:
commit
256b6f1aff
@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -28,8 +28,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -29,8 +29,11 @@ get (GListModel *model,
|
||||
guint position)
|
||||
{
|
||||
GObject *object = g_list_model_get_item (model, position);
|
||||
guint number;
|
||||
g_assert (object != NULL);
|
||||
return GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
number = GPOINTER_TO_UINT (g_object_get_qdata (object, number_quark));
|
||||
g_object_unref (object);
|
||||
return number;
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -155,7 +158,7 @@ create_sub_model_cb (gpointer item,
|
||||
gpointer unused)
|
||||
{
|
||||
if (G_IS_LIST_MODEL (item))
|
||||
return item;
|
||||
return g_object_ref (item);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user