mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Kvp no longer parses entries looking for delimiters
This commit is contained in:
@@ -132,15 +132,13 @@ setup_memory (Fixture* fixture, gconstpointer pData)
|
||||
xaccAccountSetCommodity (acct1, currency);
|
||||
|
||||
auto frame = qof_instance_get_slots (QOF_INSTANCE (acct1));
|
||||
frame->set ("int64-val", new KvpValue (INT64_C (100)));
|
||||
frame->set ("double-val", new KvpValue (3.14159));
|
||||
frame->set ("numeric-val", new KvpValue (gnc_numeric_zero ()));
|
||||
|
||||
frame->set ("timespec-val", new KvpValue (timespec_now ()));
|
||||
|
||||
frame->set ("string-val", new KvpValue ("abcdefghijklmnop"));
|
||||
frame->set ({"int64-val"}, new KvpValue (INT64_C (100)));
|
||||
frame->set ({"double-val"}, new KvpValue (3.14159));
|
||||
frame->set ({"numeric-val"}, new KvpValue (gnc_numeric_zero ()));
|
||||
frame->set ({"timespec-val"}, new KvpValue (timespec_now ()));
|
||||
frame->set ({"string-val"}, new KvpValue ("abcdefghijklmnop"));
|
||||
auto guid = qof_instance_get_guid (QOF_INSTANCE (acct1));
|
||||
frame->set ("guid-val", new KvpValue (const_cast<GncGUID*> (guid_copy (
|
||||
frame->set ({"guid-val"}, new KvpValue (const_cast<GncGUID*> (guid_copy (
|
||||
guid))));
|
||||
|
||||
gnc_account_append_child (root, acct1);
|
||||
|
||||
@@ -226,7 +226,7 @@ set_slot_from_value (slot_info_t* pInfo, KvpValue* pValue)
|
||||
case FRAME:
|
||||
{
|
||||
auto key = get_key_from_path (pInfo->path);
|
||||
pInfo->pKvpFrame->set (key.c_str(), pValue);
|
||||
pInfo->pKvpFrame->set ({key.c_str()}, pValue);
|
||||
break;
|
||||
}
|
||||
case LIST:
|
||||
@@ -245,7 +245,7 @@ set_slot_from_value (slot_info_t* pInfo, KvpValue* pValue)
|
||||
frame->set_path ({path.c_str(), key.c_str()}, pValue);
|
||||
}
|
||||
else
|
||||
frame->set (key.c_str(), pValue);
|
||||
frame->set ({key.c_str()}, pValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -464,7 +464,7 @@ set_guid_val (gpointer pObject, gpointer pValue)
|
||||
|
||||
slots_load_info (newInfo);
|
||||
pValue = new KvpValue {newInfo->pList};
|
||||
pInfo->pKvpFrame->set (key.c_str(), pValue);
|
||||
pInfo->pKvpFrame->set ({key.c_str()}, pValue);
|
||||
delete newInfo;
|
||||
break;
|
||||
}
|
||||
@@ -487,7 +487,7 @@ set_guid_val (gpointer pObject, gpointer pValue)
|
||||
default:
|
||||
{
|
||||
auto key = get_key_from_path (pInfo->path);
|
||||
pInfo->pKvpFrame->set (key.c_str(), new KvpValue {newFrame});
|
||||
pInfo->pKvpFrame->set ({key.c_str()}, new KvpValue {newFrame});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -808,7 +808,7 @@ kvp_frame_slot_end_handler (gpointer data_for_children,
|
||||
if (key_node_count != 1) return (FALSE);
|
||||
|
||||
value_cr->should_cleanup = TRUE;
|
||||
f->set (key, value);
|
||||
f->set ({key}, value);
|
||||
if (delete_value)
|
||||
delete value;
|
||||
return (TRUE);
|
||||
|
||||
@@ -440,7 +440,7 @@ dom_tree_to_kvp_frame_given (xmlNodePtr node, KvpFrame* frame)
|
||||
if (val)
|
||||
{
|
||||
//We're deleting the old KvpValue returned by replace_nc().
|
||||
delete frame->set (key, val);
|
||||
delete frame->set ({key}, val);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ test_kvp_get_slot (int run,
|
||||
KvpFrame* test_frame1, const KvpValue* test_val1,
|
||||
const gchar* test_key)
|
||||
{
|
||||
auto test_val2 = test_frame1->get_slot (test_key);
|
||||
auto test_val2 = test_frame1->get_slot ({test_key});
|
||||
auto msg = "KvpFrame::get_slot";
|
||||
if (compare (test_val1, test_val2) == 0)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ test_kvp_copy_get_slot (int run,
|
||||
const gchar* test_key)
|
||||
{
|
||||
auto test_frame2 = new KvpFrame (*test_frame1);
|
||||
auto test_val2 = test_frame2->get_slot (test_key);
|
||||
auto test_val2 = test_frame2->get_slot ({test_key});
|
||||
auto msg = "KvpFrame::get_slot() from a copy-constructed frame";
|
||||
if (compare (test_val1, test_val2) == 0)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ test_kvp_frames1 (void)
|
||||
auto test_frame1 = new KvpFrame;
|
||||
auto test_key = get_random_string_without ("/");
|
||||
|
||||
test_frame1->set (test_key, test_val1);
|
||||
test_frame1->set ({test_key}, test_val1);
|
||||
|
||||
test_kvp_get_slot (i, test_frame1, test_val1, test_key);
|
||||
test_kvp_copy_compare (i, test_frame1, test_val1, test_key);
|
||||
|
||||
Reference in New Issue
Block a user