mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Pass QofInstance instead of KvpFrame to gnc_sql_slots_save.
This commit is contained in:
parent
8b53483562
commit
55e4d30a44
@ -383,7 +383,7 @@ gnc_sql_save_account( GncSqlBackend* be, QofInstance* inst )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3072,7 +3072,7 @@ gnc_sql_commit_standard_item( GncSqlBackend* be, QofInstance* inst, const gchar*
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ save_budget( GncSqlBackend* be, QofInstance* inst )
|
||||
}
|
||||
if ( is_ok )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -213,7 +213,7 @@ do_commit_commodity( GncSqlBackend* be, QofInstance* inst, gboolean force_insert
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -198,7 +198,7 @@ save_employee( GncSqlBackend* be, QofInstance* inst )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ save_invoice( GncSqlBackend* be, QofInstance* inst )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ gnc_sql_save_schedxaction( GncSqlBackend* be, QofInstance* inst )
|
||||
// Now, commit any slots
|
||||
if ( op == OP_DB_INSERT || op == OP_DB_UPDATE )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -708,7 +708,8 @@ save_slot( const gchar* key, KvpValue* value, gpointer data )
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid, gboolean is_infant, KvpFrame* pFrame )
|
||||
gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid, gboolean is_infant,
|
||||
QofInstance *inst)
|
||||
{
|
||||
slot_info_t slot_info = { NULL, NULL, TRUE, NULL, KVP_TYPE_INVALID, NULL, FRAME, NULL, g_string_new(NULL) };
|
||||
KvpFrame *pFrame = qof_instance_get_slots (inst);
|
||||
|
@ -35,7 +35,6 @@ extern "C"
|
||||
|
||||
#include <glib.h>
|
||||
#include "guid.h"
|
||||
#include "kvp_frame.h"
|
||||
#include "qof.h"
|
||||
#include "gnc-backend-sql.h"
|
||||
|
||||
@ -45,11 +44,11 @@ extern "C"
|
||||
* @param be SQL backend
|
||||
* @param guid Object guid
|
||||
* @param is_infant Is this an infant object?
|
||||
* @param pFrame Top-level KVP frame
|
||||
* @param inst The QodInstance owning the slots.
|
||||
* @return TRUE if successful, FALSE if error
|
||||
*/
|
||||
gboolean gnc_sql_slots_save( GncSqlBackend* be, const GncGUID* guid,
|
||||
gboolean is_infant, KvpFrame* pFrame );
|
||||
gboolean is_infant, QofInstance *inst );
|
||||
|
||||
/**
|
||||
* gnc_sql_slots_delete - Deletes slots for an object from the db.
|
||||
|
@ -454,7 +454,7 @@ save_taxtable( GncSqlBackend* be, QofInstance* inst )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
if ( is_ok )
|
||||
{
|
||||
is_ok = save_tt_entries( be, guid, gncTaxTableGetEntries( tt ) );
|
||||
|
@ -627,10 +627,7 @@ commit_split( GncSqlBackend* be, QofInstance* inst )
|
||||
|
||||
if ( is_ok && !qof_instance_get_destroying (inst))
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be,
|
||||
guid,
|
||||
is_infant,
|
||||
qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
|
||||
return is_ok;
|
||||
@ -724,7 +721,7 @@ save_transaction( GncSqlBackend* be, Transaction* pTx, gboolean do_save_splits )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
if ( ! is_ok )
|
||||
{
|
||||
err = "Slots save failed. Check trace log for SQL errors";
|
||||
|
@ -194,7 +194,7 @@ save_vendor( GncSqlBackend* be, QofInstance* inst )
|
||||
guid = qof_instance_get_guid( inst );
|
||||
if ( !qof_instance_get_destroying(inst) )
|
||||
{
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, qof_instance_get_slots( inst ) );
|
||||
is_ok = gnc_sql_slots_save( be, guid, is_infant, inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user