From 1a4b60fb36f0102d29654ac355c2144654d41ae5 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Tue, 18 Sep 2018 00:51:57 -0300 Subject: [PATCH] tree-list-model: Return the correct item type When passthrough is enabled, it should return the GType of the child GListModels; when disabled, it should be GTK_TYPE_TREE_LIST_ROW. The conditions are inverted however, causing a few warnings to trigger. Fix that by returning the correct GType. --- gtk/gtktreelistmodel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c index a612057d96..c619347e54 100644 --- a/gtk/gtktreelistmodel.c +++ b/gtk/gtktreelistmodel.c @@ -576,9 +576,9 @@ gtk_tree_list_model_get_item_type (GListModel *list) GtkTreeListModel *self = GTK_TREE_LIST_MODEL (list); if (self->passthrough) - return GTK_TYPE_TREE_LIST_ROW; - else return g_list_model_get_item_type (self->root_node.model); + else + return GTK_TYPE_TREE_LIST_ROW; } static guint