mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove deprecated qof wrappers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16579 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d83b383a93
commit
15039eaaa9
@ -599,8 +599,6 @@ AC_SUBST(QOF_PREFIX)
|
||||
AC_SUBST(QOF_LIB_DIR)
|
||||
AC_SUBST(QOF_XML_DIR)
|
||||
|
||||
AC_DEFINE(QOF_DISABLE_DEPRECATED,1, [Don't use deprecated qof functions])
|
||||
|
||||
### --------------------------------------------------------------------------
|
||||
### Variables
|
||||
### Set up all the initial variable values...
|
||||
|
@ -11,7 +11,6 @@ AM_CFLAGS = \
|
||||
-I$(top_srcdir)/lib/libc
|
||||
|
||||
libgnc_qof_la_SOURCES = \
|
||||
deprecated.c \
|
||||
gnc-date.c \
|
||||
gnc-numeric.c \
|
||||
guid.c \
|
||||
@ -37,7 +36,6 @@ libgnc_qof_la_SOURCES = \
|
||||
qofincludedir = ${pkgincludedir}
|
||||
|
||||
qofinclude_HEADERS = \
|
||||
deprecated.h \
|
||||
gnc-date.h \
|
||||
gnc-date-p.h \
|
||||
gnc-numeric.h \
|
||||
|
@ -1,109 +0,0 @@
|
||||
/* *****************************************************************\
|
||||
* deprecated.c -- QOF deprecated function replacements *
|
||||
* Copyright (c) 2005 Neil Williams <linux@codehelp.co.uk> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License*
|
||||
* along with this program; if not, contact: *
|
||||
* *
|
||||
* Free Software Foundation Voice: +1-617-542-5942 *
|
||||
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
||||
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
||||
* *
|
||||
\********************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
#include <glib.h>
|
||||
#include "qof.h"
|
||||
|
||||
/* Don't be fooled: gnc_trace_num_spaces has external linkage and
|
||||
static storage, but can't be defined with 'extern' because it has
|
||||
an initializer, and can't be declared with 'static' because that
|
||||
would give it internal linkage. (this is why it is deprecated) */
|
||||
gint __attribute__ ((unused)) gnc_trace_num_spaces = 0;
|
||||
const char * gnc_log_prettify (const char *name)
|
||||
{
|
||||
return qof_log_prettify(name);
|
||||
}
|
||||
void gnc_start_clock (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
void gnc_report_clock (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
void gnc_report_clock_total (int a, QofLogModule b, gncLogLevel c, const char *d, const char *e, ...) { }
|
||||
|
||||
gint
|
||||
gnc_engine_register_event_handler (GNCEngineEventHandler handler,
|
||||
gpointer user_data)
|
||||
{
|
||||
return qof_event_register_old_handler(handler, user_data);
|
||||
}
|
||||
void gnc_engine_unregister_event_handler (gint handler_id)
|
||||
{
|
||||
qof_event_unregister_handler(handler_id);
|
||||
}
|
||||
void gnc_engine_suspend_events (void)
|
||||
{
|
||||
qof_event_suspend();
|
||||
}
|
||||
void gnc_engine_resume_events (void)
|
||||
{
|
||||
qof_event_resume();
|
||||
}
|
||||
void gnc_engine_gen_event (QofInstance *entity, GNCEngineEventType event_type)
|
||||
{
|
||||
qof_event_gen(entity, event_type, NULL);
|
||||
}
|
||||
QofBookMergeData*
|
||||
qof_book_mergeInit(QofBook *importBook, QofBook *targetBook)
|
||||
{
|
||||
return qof_book_merge_init(importBook, targetBook);
|
||||
}
|
||||
QofBookMergeData*
|
||||
qof_book_mergeUpdateResult(QofBookMergeData *mergeData,
|
||||
QofBookMergeResult tag)
|
||||
{
|
||||
return qof_book_merge_update_result(mergeData, tag);
|
||||
}
|
||||
gint
|
||||
qof_book_mergeCommit(QofBookMergeData *mergeData )
|
||||
{
|
||||
return qof_book_merge_commit(mergeData);
|
||||
}
|
||||
void
|
||||
qof_book_mergeRuleForeach(QofBookMergeData *mergeData,
|
||||
QofBookMergeRuleForeachCB cb,
|
||||
QofBookMergeResult mergeResult )
|
||||
{
|
||||
qof_book_merge_rule_foreach(mergeData, cb, mergeResult);
|
||||
}
|
||||
gpointer gnc_string_cache_insert(gconstpointer key)
|
||||
{
|
||||
return (gpointer)qof_util_string_cache_insert(key);
|
||||
}
|
||||
gchar * gnc_stpcpy (gchar *dest, const gchar *src)
|
||||
{
|
||||
return g_stpcpy(dest, src);
|
||||
}
|
||||
GCache* gnc_engine_get_string_cache(void)
|
||||
{
|
||||
return qof_util_get_string_cache();
|
||||
}
|
||||
void gnc_engine_string_cache_destroy (void)
|
||||
{
|
||||
qof_util_string_cache_destroy();
|
||||
}
|
||||
void gnc_string_cache_remove(gconstpointer key)
|
||||
{
|
||||
qof_util_string_cache_remove(key);
|
||||
}
|
||||
|
||||
/* ==================================================================== */
|
||||
#endif /* QOF_DISABLE_DEPRECATED */
|
@ -1,168 +0,0 @@
|
||||
/***************************************************************************
|
||||
* deprecated.h
|
||||
*
|
||||
* Mon Nov 21 14:08:25 2005
|
||||
* Copyright 2005 Neil Williams
|
||||
* linux@codehelp.co.uk
|
||||
****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
|
||||
#ifndef _DEPRECATED_H
|
||||
#define _DEPRECATED_H
|
||||
#include <glib.h> /* deprecated */
|
||||
#include "qof.h"
|
||||
|
||||
/** @file deprecated.h
|
||||
@brief transitional header from libqof1 to libqof2
|
||||
*/
|
||||
|
||||
/** \deprecated use QofLogLevel instead */
|
||||
#define gncLogLevel QofLogLevel
|
||||
|
||||
/** \deprecated use qof_log_init_filename instead */
|
||||
void gnc_log_init (void);
|
||||
|
||||
/** \deprecated use qof_log_set_level insead. */
|
||||
void gnc_set_log_level(QofLogModule module, gncLogLevel level);
|
||||
|
||||
/** \deprecated use qof_log_set_level_registered instead. */
|
||||
void gnc_set_log_level_global(gncLogLevel level);
|
||||
|
||||
/** \deprecated use qof_log_set_level_registered instead.
|
||||
|
||||
This function has been deprecated because the function name
|
||||
is very misleading. It may, in future, be modified to be
|
||||
truly global (i.e. make changes to log modules where no
|
||||
log_level has been explicitly set) but, despite the name,
|
||||
it only ever modified known (gnucash) modules. Future changes
|
||||
would require that if this function is made truly global it must
|
||||
preserve the effect of qof_log_set_level_registered and the advantages
|
||||
of silent log_modules for those programs that do not use _global. Support
|
||||
could be required for removing log_modules from the hashtable.
|
||||
*/
|
||||
void qof_log_set_level_global(QofLogLevel level);
|
||||
|
||||
/** \deprecated use qof_log_set_file instead. */
|
||||
void gnc_set_logfile (FILE *outfile);
|
||||
|
||||
/** \deprecated use qof_log_prettify instead. */
|
||||
const char * gnc_log_prettify (const char *name);
|
||||
|
||||
/** \deprecated use qof_log_check instead. */
|
||||
gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level);
|
||||
|
||||
/** \deprecated use qof_start_clock */
|
||||
void gnc_start_clock (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
|
||||
/** \deprecated use qof_report_clock */
|
||||
void gnc_report_clock (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
|
||||
/** \deprecated use qof_report_clock_total */
|
||||
void gnc_report_clock_total (int, QofLogModule, gncLogLevel, const char*, const char*, ...);
|
||||
|
||||
/** \deprecated use QOF_EVENT_NONE instead. */
|
||||
#define GNC_EVENT_NONE QOF_EVENT_NONE
|
||||
/** \deprecated use QOF_EVENT_CREATE instead. */
|
||||
#define GNC_EVENT_CREATE QOF_EVENT_CREATE
|
||||
/** \deprecated use QOF_EVENT_MODIFY instead. */
|
||||
#define GNC_EVENT_MODIFY QOF_EVENT_MODIFY
|
||||
/** \deprecated use QOF_EVENT_DESTROY instead. */
|
||||
#define GNC_EVENT_DESTROY QOF_EVENT_DESTROY
|
||||
/** \deprecated use QOF_EVENT_ADD instead. */
|
||||
#define GNC_EVENT_ADD QOF_EVENT_ADD
|
||||
/** \deprecated use QOF_EVENT_REMOVE instead. */
|
||||
#define GNC_EVENT_REMOVE QOF_EVENT_REMOVE
|
||||
/** \deprecated */
|
||||
#define GNC_EVENT_ALL QOF_EVENT_ALL
|
||||
/** \deprecated use QofEventName instead. */
|
||||
#define GNCEngineEventType QofEventId
|
||||
/** \deprecated use QofEventHandler instead. */
|
||||
typedef void (*GNCEngineEventHandler) (GUID *entity, QofIdType type,
|
||||
GNCEngineEventType event_type,
|
||||
gpointer user_data);
|
||||
/** \deprecated For backwards compatibility - New code must not use
|
||||
this function. The function and the handler prototype will be remove
|
||||
from qofevent.c in libqoqf2 */
|
||||
gint qof_event_register_old_handler(GNCEngineEventHandler old_handler,
|
||||
gpointer user_data);
|
||||
/** \deprecated use qof_event_register_handler instead. */
|
||||
gint gnc_engine_register_event_handler (GNCEngineEventHandler handler,
|
||||
gpointer user_data);
|
||||
/** \deprecated use qof_event_unregister_handler instead. */
|
||||
void gnc_engine_unregister_event_handler (gint handler_id);
|
||||
/** \deprecated use qof_event_gen instead. */
|
||||
void gnc_engine_gen_event (QofInstance *entity, GNCEngineEventType event_type);
|
||||
/** \deprecated use qof_event_suspend instead. */
|
||||
void gnc_engine_suspend_events (void);
|
||||
/** \deprecated use qof_event_resume instead. */
|
||||
void gnc_engine_resume_events (void);
|
||||
/** \deprecated use QofBookMergeResult instead. */
|
||||
#define qof_book_mergeResult QofBookMergeResult
|
||||
/** \deprecated use QofBookMergeRule instead. */
|
||||
#define qof_book_mergeRule QofBookMergeRule
|
||||
/** \deprecated use QofBookMergeData instead. */
|
||||
#define qof_book_mergeData QofBookMergeData
|
||||
/** \deprecated use qof_book_merge_init instead. */
|
||||
QofBookMergeData* qof_book_mergeInit( QofBook *importBook, QofBook *targetBook);
|
||||
/** \deprecated use QofBookMergeRuleForeachCB instead. */
|
||||
typedef void (* qof_book_mergeRuleForeachCB)(QofBookMergeData*, QofBookMergeRule*, guint);
|
||||
/** \deprecated use qof_book_merge_rule_foreach instead. */
|
||||
void qof_book_mergeRuleForeach(QofBookMergeData* mergeData,
|
||||
QofBookMergeRuleForeachCB callback ,
|
||||
QofBookMergeResult mergeResult);
|
||||
/** \deprecated use qof_book_merge_update_result instead. */
|
||||
QofBookMergeData* qof_book_mergeUpdateResult(QofBookMergeData *mergeData,
|
||||
QofBookMergeResult tag);
|
||||
/** \deprecated use qof_book_merge_commit instead. */
|
||||
gint qof_book_mergeCommit(QofBookMergeData *mergeData );
|
||||
/** \deprecated Use the function versions, safe_strcmp() and
|
||||
safe_strcasecmp() instead. */
|
||||
#define SAFE_STRCMP_REAL(fcn,da,db) { \
|
||||
if ((da) && (db)) { \
|
||||
if ((da) != (db)) { \
|
||||
gint retval = fcn ((da), (db)); \
|
||||
/* if strings differ, return */ \
|
||||
if (retval) return retval; \
|
||||
} \
|
||||
} else \
|
||||
if ((!(da)) && (db)) { \
|
||||
return -1; \
|
||||
} else \
|
||||
if ((da) && (!(db))) { \
|
||||
return +1; \
|
||||
} \
|
||||
}
|
||||
/** \deprecated use safe_strcmp() */
|
||||
#define SAFE_STRCMP(da,db) SAFE_STRCMP_REAL(strcmp,(da),(db))
|
||||
/** \deprecated use safe_strcasecmp() */
|
||||
#define SAFE_STRCASECMP(da,db) SAFE_STRCMP_REAL(strcasecmp,(da),(db))
|
||||
/** \deprecated use qof_util_string_cache_insert instead. */
|
||||
gpointer gnc_string_cache_insert(gconstpointer key);
|
||||
#define GNC_SCANF_LLD QOF_SCANF_LLD /**< \deprecated use QOF_SCANF_LLD instead. */
|
||||
/** \deprecated use qof_util_stpcpy instead. */
|
||||
gchar * gnc_stpcpy (gchar *dest, const gchar *src);
|
||||
/** \deprecated use qof_init instead. */
|
||||
GCache* gnc_engine_get_string_cache(void);
|
||||
/** \deprecated use qof_init instead. */
|
||||
GCache* qof_util_get_string_cache(void);
|
||||
/** \deprecated use qof_close instead. */
|
||||
void gnc_engine_string_cache_destroy (void);
|
||||
/** \deprecated use qof_util_string_cache_remove instead. */
|
||||
void gnc_string_cache_remove(gconstpointer key);
|
||||
/** \deprecated no replacement. */
|
||||
void qof_book_set_schedxactions( QofBook *book, GList *newList );
|
||||
#endif /* _DEPRECATED_H */
|
||||
#endif /* QOF_DISABLE_DEPRECATED */
|
@ -1246,7 +1246,7 @@ string_to_gnc_numeric(const gchar* str, gnc_numeric *n)
|
||||
|
||||
#ifdef GNC_DEPRECATED
|
||||
/* must use "<" here because %n's effects aren't well defined */
|
||||
if(sscanf(str, " " GNC_SCANF_LLD "/" GNC_SCANF_LLD "%n",
|
||||
if(sscanf(str, " " QOF_SCANF_LLD "/" QOF_SCANF_LLD "%n",
|
||||
&tmpnum, &tmpdenom, &num_read) < 2) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -96,7 +96,6 @@
|
||||
#include "qofchoice.h"
|
||||
#include "qofbookmerge.h"
|
||||
#include "qofreference.h"
|
||||
#include "deprecated.h"
|
||||
|
||||
/** allow easy logging of QSF debug messages */
|
||||
#define QOF_MOD_QSF "qof.backend.qsf"
|
||||
|
@ -207,7 +207,7 @@ typedef struct
|
||||
{
|
||||
GSList *mergeObjectParams; /**< GSList of ::QofParam details for each
|
||||
parameter in the current object. */
|
||||
GList *mergeList; /**< GList of all ::qof_book_mergeRule rules
|
||||
GList *mergeList; /**< GList of all ::QofBookMergeRule rules
|
||||
for the merge operation. */
|
||||
GSList *targetList; /**< GSList of ::QofInstance * for each object
|
||||
of this type in the target book */
|
||||
@ -338,7 +338,7 @@ Uses ::qof_book_get_collection with the QofBookMergeRule::mergeType object
|
||||
type to return a collection of ::QofInstance entities from either the
|
||||
QofBookMergeData::mergeBook or QofBookMergeData::targetBook. Then
|
||||
uses ::qof_collection_lookup_entity to lookup the QofBookMergeRule::importEnt
|
||||
and again the qof_book_mergeRule::targetEnt to return the two specific entities.
|
||||
and again the QofBookMergeRule::targetEnt to return the two specific entities.
|
||||
|
||||
*/
|
||||
void qof_book_merge_rule_foreach( QofBookMergeData* mergeData,
|
||||
@ -381,7 +381,7 @@ Recommended method: Only offer three options to the user per rule:
|
||||
- change MERGE_REPORT to MERGE_ABSOLUTE or MERGE_DUPLICATE
|
||||
|
||||
Handle the required result changes in code: Check the value of
|
||||
qof_book_mergeRule::mergeAbsolute and use these principles:
|
||||
QofBookMergeRule::mergeAbsolute and use these principles:
|
||||
|
||||
To ignore entities tagged as:
|
||||
- MERGE_REPORT, you must check the value of mergeAbsolute.
|
||||
@ -405,14 +405,14 @@ It is not possible to update the same rule more than once.
|
||||
|
||||
-# \b MERGE_NEW is reserved for new objects and is only pre-set if
|
||||
all parameters, including GUID, have already failed to match any
|
||||
relevant object. ::qof_book_mergeCommit will create new
|
||||
relevant object. ::qof_book_merge_commit will create new
|
||||
entities for all rules tagged as MERGE_NEW.
|
||||
- if mergeAbsolute is TRUE and the user wants to import the
|
||||
data, requests to set MERGE_NEW will be forced to MERGE_UPDATE
|
||||
because an entity with that GUID already exists in the target book.
|
||||
- if MERGE_NEW is pre-set, requests to change to MERGE_UPDATE will be
|
||||
ignored because a new entity is needed.
|
||||
-# \b MERGE_UPDATE is reserved for existing objects - ::qof_book_mergeCommit
|
||||
-# \b MERGE_UPDATE is reserved for existing objects - ::qof_book_merge_commit
|
||||
will require a matching entity to update and will force a change to back to
|
||||
MERGE_NEW if none is known to exist, using the principle above.
|
||||
-# \b MERGE_INVALID will cause an abort of the merge process.
|
||||
@ -449,7 +449,7 @@ qof_book_merge_update_result(QofBookMergeData *mergeData, QofBookMergeResult tag
|
||||
|
||||
qof_book_merge_commit will abort the \b entire merge operation if any rule
|
||||
is set to ::MERGE_INVALID. It is the responsibility of the calling
|
||||
function to handle the error code from ::qof_book_mergeCommit, close the
|
||||
function to handle the error code from ::qof_book_merge_commit, close the
|
||||
dialogue and return. qof_book_merge_commit will already have halted the merge
|
||||
operation and freed any memory allocated to all merge structures before
|
||||
returning the error code. There is no way for the dialogue process to report
|
||||
|
@ -30,9 +30,6 @@
|
||||
/* for backwards compatibility - to be moved back to qofevent.c in libqof2 */
|
||||
typedef struct
|
||||
{
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
GNCEngineEventHandler old_handler; /** \deprecated */
|
||||
#endif
|
||||
QofEventHandler handler;
|
||||
gpointer user_data;
|
||||
|
||||
|
@ -68,40 +68,6 @@ find_next_handler_id(void)
|
||||
return handler_id;
|
||||
}
|
||||
|
||||
/* support deprecated code with a private function*/
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
gint
|
||||
qof_event_register_old_handler (GNCEngineEventHandler handler, gpointer user_data)
|
||||
{
|
||||
HandlerInfo *hi;
|
||||
gint handler_id;
|
||||
|
||||
ENTER ("(handler=%p, data=%p)", handler, user_data);
|
||||
|
||||
/* sanity check */
|
||||
if (!handler)
|
||||
{
|
||||
PERR ("no handler specified");
|
||||
return 0;
|
||||
}
|
||||
PINFO (" deprecated handler specified");
|
||||
|
||||
handler_id = find_next_handler_id();
|
||||
/* Found one, add the handler */
|
||||
hi = g_new0 (HandlerInfo, 1);
|
||||
|
||||
hi->old_handler = handler;
|
||||
hi->user_data = user_data;
|
||||
hi->handler_id = handler_id;
|
||||
|
||||
handlers = g_list_prepend (handlers, hi);
|
||||
|
||||
LEAVE (" (handler=%p, data=%p) handler_id=%d", handler, user_data, handler_id);
|
||||
return handler_id;
|
||||
|
||||
}
|
||||
#endif /* QOF_DISABLE_DEPRECATED */
|
||||
|
||||
gint
|
||||
qof_event_register_handler (QofEventHandler handler, gpointer user_data)
|
||||
{
|
||||
@ -147,23 +113,15 @@ qof_event_unregister_handler (gint handler_id)
|
||||
|
||||
/* Normally, we could actually remove the handler's node from the
|
||||
list, but we may be unregistering the event handler as a result
|
||||
of a generated event, such as GNC_EVENT_DESTROY. In that case,
|
||||
of a generated event, such as QOF_EVENT_DESTROY. In that case,
|
||||
we're in the middle of walking the GList and it is wrong to
|
||||
modify the list. So, instead, we just NULL the handler. */
|
||||
if(hi->handler)
|
||||
LEAVE ("(handler_id=%d) handler=%p data=%p", handler_id,
|
||||
hi->handler, hi->user_data);
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
if(hi->old_handler)
|
||||
LEAVE ("(handler_id=%d) handler=%p data=%p", handler_id,
|
||||
hi->old_handler, hi->user_data);
|
||||
#endif
|
||||
|
||||
/* safety -- clear the handler in case we're running events now */
|
||||
hi->handler = NULL;
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
hi->old_handler = NULL;
|
||||
#endif
|
||||
|
||||
if (handler_run_level == 0) {
|
||||
handlers = g_list_remove_link (handlers, node);
|
||||
@ -231,15 +189,6 @@ qof_event_generate_internal (QofInstance *entity, QofEventId event_id,
|
||||
HandlerInfo *hi = node->data;
|
||||
|
||||
next_node = node->next;
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
if ((hi->old_handler) && (use_old_handlers))
|
||||
{
|
||||
PINFO(" deprecated: id=%d hi=%p han=%p", hi->handler_id, hi,
|
||||
hi->old_handler);
|
||||
hi->old_handler ((GUID *)&entity->guid, entity->e_type,
|
||||
event_id, hi->user_data);
|
||||
}
|
||||
#endif
|
||||
if (hi->handler)
|
||||
{
|
||||
PINFO("id=%d hi=%p han=%p data=%p", hi->handler_id, hi,
|
||||
@ -258,11 +207,7 @@ qof_event_generate_internal (QofInstance *entity, QofEventId event_id,
|
||||
{
|
||||
HandlerInfo *hi = node->data;
|
||||
next_node = node->next;
|
||||
if ((hi->handler == NULL)
|
||||
#ifndef QOF_DISABLE_DEPRECATED
|
||||
&&(hi->old_handler == NULL)
|
||||
#endif
|
||||
)
|
||||
if (hi->handler == NULL)
|
||||
{
|
||||
/* remove this node from the list, then free this node */
|
||||
handlers = g_list_remove_link (handlers, node);
|
||||
|
@ -126,7 +126,7 @@ void qof_event_gen (QofInstance *entity, QofEventId event_type,
|
||||
/** \brief Suspend all engine events.
|
||||
*
|
||||
* This function may be called multiple times. To resume event generation,
|
||||
* an equal number of calls to gnc_engine_resume_events
|
||||
* an equal number of calls to qof_event_resume
|
||||
* must be made.
|
||||
*/
|
||||
void qof_event_suspend (void);
|
||||
|
@ -268,13 +268,8 @@ static gboolean qof_util_str_equal(gconstpointer v, gconstpointer v2)
|
||||
return (v && v2) ? g_str_equal(v, v2) : FALSE;
|
||||
}
|
||||
#endif
|
||||
#ifdef QOF_DISABLE_DEPRECATED
|
||||
static GCache*
|
||||
qof_util_get_string_cache(void)
|
||||
#else
|
||||
GCache*
|
||||
qof_util_get_string_cache(void)
|
||||
#endif
|
||||
{
|
||||
if(!qof_string_cache) {
|
||||
qof_string_cache = g_cache_new(
|
||||
|
@ -438,7 +438,7 @@ test_rule_loop (QofBookMergeData *mergeData, QofBookMergeRule *rule, guint remai
|
||||
|
||||
Take particular care with MERGE_NEW - targetEnt is always NULL until the Commit.
|
||||
Do not attempt to use param_getfcn on targetEnt in the loop called by
|
||||
qof_book_mergeRuleForeach(rule_loop, MERGE_NEW);
|
||||
QofBookMergeRuleForeach(rule_loop, MERGE_NEW);
|
||||
|
||||
*/
|
||||
gboolean skip_target;
|
||||
|
@ -33,7 +33,7 @@
|
||||
\n
|
||||
This druid builds a second ::QofBook in memory using ::QofSession and
|
||||
populates the book with accounts created using the usual New Account Tree
|
||||
code. The druid then uses ::qof_book_mergeInit to begin the merge
|
||||
code. The druid then uses ::qof_book_merge_init to begin the merge
|
||||
of the new book (created with QofSession) with the existing QofBook
|
||||
(loaded by the user), with user intervention and collision handling.
|
||||
|
||||
@ -44,9 +44,9 @@ of the new book (created with QofSession) with the existing QofBook
|
||||
GUID's in the target book so objects that do not have a GUID match cannot be assumed to
|
||||
be ::MERGE_NEW - parameter values must be checked.
|
||||
|
||||
- If a GUID match exists, set qof_book_mergeRule::mergeAbsolute to \a TRUE.
|
||||
- If a GUID match exists, set QofBookMergeRule::mergeAbsolute to \a TRUE.
|
||||
-# If ALL parameters in the import object match the target object with the same \a GUID,
|
||||
set ::qof_book_mergeResult to \a MERGE_ABSOLUTE.
|
||||
set ::QofBookMergeResult to \a MERGE_ABSOLUTE.
|
||||
-# If any parameters differ, set ::MERGE_UPDATE.
|
||||
- If the import object \a GUID does not match an existing object,
|
||||
mergeAbsolute is unchanged from the default \a FALSE
|
||||
@ -65,7 +65,7 @@ Note that this will not set or return an error value. However, g_return is only
|
||||
used for critical errors that arise from programming errors, not for invalid import data
|
||||
which should be cleaned up before creating the import QofBook.
|
||||
|
||||
Only ::qof_book_mergeInit, ::qof_book_mergeUpdateResult and ::qof_book_mergeCommit return
|
||||
Only ::qof_book_merge_init, ::qof_book_merge_update_result and ::qof_book_merge_commit return
|
||||
any error values to the calling process.
|
||||
|
||||
@{ */
|
||||
|
Loading…
Reference in New Issue
Block a user