[devhelp] KeywordModel: add several FIXME comments



commit 0dd29dd5c6b9d539ce44c99618a556c124ca01c4
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Dec 9 20:36:13 2017 +0100

    KeywordModel: add several FIXME comments

 src/dh-keyword-model.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index 18c3d21..f4f53eb 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -43,6 +43,9 @@ typedef struct {
         gchar *current_book_id;
 
         /* List of DhLink* */
+        /* FIXME ref the DhLinks, in case a DhBook is destroyed while the
+         * DhLinks are still stored here.
+         */
         GQueue keywords;
 
         gint stamp;
@@ -110,6 +113,7 @@ dh_keyword_model_init (DhKeywordModel *model)
 static GtkTreeModelFlags
 keyword_model_get_flags (GtkTreeModel *tree_model)
 {
+        /* FIXME: check if GTK_TREE_MODEL_ITERS_PERSIST is correct. */
         return GTK_TREE_MODEL_ITERS_PERSIST | GTK_TREE_MODEL_LIST_ONLY;
 }
 
@@ -128,6 +132,10 @@ keyword_model_get_column_type (GtkTreeModel *tree_model,
                 return G_TYPE_STRING;
 
         case DH_KEYWORD_MODEL_COL_LINK:
+                /* FIXME: use DH_TYPE_LINK boxed type, to take advantage of ref
+                 * counting, to have safer code in case a DhLink is freed when
+                 * still stored in the GtkTreeModel.
+                 */
                 return G_TYPE_POINTER;
 
         case DH_KEYWORD_MODEL_COL_CURRENT_BOOK_FLAG:


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