[gnome-builder/wip/gtk4-port: 1771/1774] plugins/testui: cache results from IdeTest to GbpTestuiItem map




commit 0959c42da9a4a9bac6f5b1c5a743d8a1c0093ce9
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 9 16:45:15 2022 -0700

    plugins/testui: cache results from IdeTest to GbpTestuiItem map

 src/plugins/testui/gbp-testui-item.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/testui/gbp-testui-item.c b/src/plugins/testui/gbp-testui-item.c
index c7d965431..6805e030d 100644
--- a/src/plugins/testui/gbp-testui-item.c
+++ b/src/plugins/testui/gbp-testui-item.c
@@ -251,9 +251,10 @@ gbp_testui_item_create_child_model (gpointer item,
   if (IDE_IS_TEST_MANAGER (self->instance))
     {
       GListModel *tests = ide_test_manager_list_tests (self->instance);
-      return G_LIST_MODEL (gtk_map_list_model_new (g_object_ref (tests),
-                                                   gbp_testui_item_map_func,
-                                                   NULL, NULL));
+      GtkMapListModel *map = gtk_map_list_model_new (g_object_ref (tests),
+                                                     gbp_testui_item_map_func,
+                                                     NULL, NULL);
+      return G_LIST_MODEL (ide_cached_list_model_new (G_LIST_MODEL (map)));
     }
 
   /* TODO: We could insert information about the test run here, like


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]