mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-27 19:30:27 -06:00
Add some missing log Macros for the price model
Add some missing LEAVE macro statements so the log entries do not get longer and longer.
This commit is contained in:
parent
af96c746a1
commit
9f0558ffb5
@ -219,6 +219,8 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
||||
GncTreeModelPricePrivate *priv;
|
||||
const GList *item;
|
||||
|
||||
ENTER(" ");
|
||||
|
||||
item = gnc_gobject_tracking_get_list(GNC_TREE_MODEL_PRICE_NAME);
|
||||
for ( ; item; item = g_list_next(item))
|
||||
{
|
||||
@ -232,8 +234,7 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
||||
}
|
||||
}
|
||||
|
||||
model = g_object_new (GNC_TYPE_TREE_MODEL_PRICE,
|
||||
NULL);
|
||||
model = g_object_new (GNC_TYPE_TREE_MODEL_PRICE, NULL);
|
||||
|
||||
priv = GNC_TREE_MODEL_PRICE_GET_PRIVATE(model);
|
||||
priv->book = book;
|
||||
@ -242,6 +243,7 @@ gnc_tree_model_price_new (QofBook *book, GNCPriceDB *price_db)
|
||||
priv->event_handler_id =
|
||||
qof_event_register_handler (gnc_tree_model_price_event_handler, model);
|
||||
|
||||
LEAVE("returning new model %p", model);
|
||||
return GTK_TREE_MODEL (model);
|
||||
}
|
||||
|
||||
@ -1244,7 +1246,7 @@ gnc_tree_model_price_get_iter_from_commodity (GncTreeModelPrice *model,
|
||||
n = g_list_index(list, commodity);
|
||||
if (n == -1)
|
||||
{
|
||||
LEAVE("not in list");
|
||||
LEAVE("commodity not in list");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1280,11 +1282,17 @@ gnc_tree_model_price_get_iter_from_namespace (GncTreeModelPrice *model,
|
||||
ct = qof_book_get_data (priv->book, GNC_COMMODITY_TABLE);
|
||||
list = gnc_commodity_table_get_namespaces_list(ct);
|
||||
if (list == NULL)
|
||||
{
|
||||
LEAVE("namespace list empty");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
n = g_list_index(list, name_space);
|
||||
if (n == -1)
|
||||
{
|
||||
LEAVE("namespace not found");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
iter->stamp = model->stamp;
|
||||
iter->user_data = ITER_IS_NAMESPACE;
|
||||
@ -1596,6 +1604,7 @@ gnc_tree_model_price_event_handler (QofInstance *entity,
|
||||
}
|
||||
else
|
||||
{
|
||||
LEAVE(" ");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -309,18 +309,19 @@ gnc_price_create (QofBook *book)
|
||||
|
||||
g_return_val_if_fail (book, NULL);
|
||||
|
||||
ENTER(" ");
|
||||
p = g_object_new(GNC_TYPE_PRICE, NULL);
|
||||
|
||||
qof_instance_init_data (&p->inst, GNC_ID_PRICE, book);
|
||||
qof_event_gen (&p->inst, QOF_EVENT_CREATE, NULL);
|
||||
|
||||
LEAVE ("price created %p", p);
|
||||
return p;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_price_destroy (GNCPrice *p)
|
||||
{
|
||||
ENTER(" ");
|
||||
ENTER("destroy price %p", p);
|
||||
qof_event_gen (&p->inst, QOF_EVENT_DESTROY, NULL);
|
||||
|
||||
if (p->type) CACHE_REMOVE(p->type);
|
||||
@ -372,14 +373,14 @@ gnc_price_clone (GNCPrice* p, QofBook *book)
|
||||
|
||||
if (!p)
|
||||
{
|
||||
LEAVE (" ");
|
||||
LEAVE ("return NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
new_p = gnc_price_create(book);
|
||||
if (!new_p)
|
||||
{
|
||||
LEAVE (" ");
|
||||
LEAVE ("return NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -394,7 +395,7 @@ gnc_price_clone (GNCPrice* p, QofBook *book)
|
||||
gnc_price_set_value(new_p, gnc_price_get_value(p));
|
||||
gnc_price_set_currency(new_p, gnc_price_get_currency(p));
|
||||
gnc_price_commit_edit(new_p);
|
||||
LEAVE (" ");
|
||||
LEAVE ("return cloned price %p", new_p);
|
||||
return(new_p);
|
||||
}
|
||||
|
||||
@ -1801,7 +1802,7 @@ GNCPrice *gnc_pricedb_lookup_latest(GNCPriceDB *db,
|
||||
result = price_list->data;
|
||||
gnc_price_ref(result);
|
||||
g_list_free (price_list);
|
||||
LEAVE(" ");
|
||||
LEAVE("price is %p", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -2202,7 +2203,11 @@ gnc_pricedb_nth_price (GNCPriceDB *db,
|
||||
ENTER ("db=%p commodity=%s index=%d", db, gnc_commodity_get_mnemonic(c), n);
|
||||
|
||||
if (last_c && prices && last_c == c)
|
||||
return g_list_nth_data (prices, n);
|
||||
{
|
||||
result = g_list_nth_data (prices, n);
|
||||
LEAVE ("price=%p", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
last_c = c;
|
||||
|
||||
@ -2255,6 +2260,7 @@ gnc_pricedb_lookup_at_time64(GNCPriceDB *db,
|
||||
{
|
||||
gnc_price_ref(p);
|
||||
g_list_free (price_list);
|
||||
LEAVE("price is %p", p);
|
||||
return p;
|
||||
}
|
||||
item = item->next;
|
||||
|
Loading…
Reference in New Issue
Block a user