[gnome-software] trivial: When merging GsApp objects, also copy the related apps



commit 8d020eca2e81fae20739998f44d80b37c930c091
Author: Richard Hughes <richard hughsie com>
Date:   Mon Feb 17 12:58:13 2014 +0000

    trivial: When merging GsApp objects, also copy the related apps

 src/gs-app.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index bbdb763..b17f02d 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -1533,6 +1533,7 @@ gs_app_subsume (GsApp *app, GsApp *other)
        const gchar *tmp;
        GList *keys;
        GList *l;
+       GsApp *app_tmp;
        GsAppPrivate *priv2 = other->priv;
        GsAppPrivate *priv = app->priv;
        guint i;
@@ -1568,6 +1569,10 @@ gs_app_subsume (GsApp *app, GsApp *other)
                tmp = g_ptr_array_index (priv2->categories, i);
                gs_app_add_category (app, tmp);
        }
+       for (i = 0; i < priv2->related->len; i++) {
+               app_tmp = g_ptr_array_index (priv2->related, i);
+               gs_app_add_related (app, app_tmp);
+       }
 
        /* also metadata */
        keys = g_hash_table_get_keys (priv2->metadata);


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