mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
Bug #638543: Remove the counter() method from the backends.
Patch by Matthijs Kooijman: This method is not implemented by either of the backends and removing it makes the subsequent commits possible. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20052 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ae30067f56
commit
d565bdb982
@ -1310,8 +1310,6 @@ init_sql_backend( GncDbiBackend* dbi_be )
|
||||
be->commit = gnc_dbi_commit_edit;
|
||||
be->rollback = gnc_dbi_rollback_edit;
|
||||
|
||||
be->counter = NULL;
|
||||
|
||||
/* The gda backend will not be multi-user (for now)... */
|
||||
be->events_pending = NULL;
|
||||
be->process_events = NULL;
|
||||
|
@ -1219,8 +1219,6 @@ gnc_backend_new(void)
|
||||
be->free_query = NULL;
|
||||
be->run_query = NULL;
|
||||
|
||||
be->counter = NULL;
|
||||
|
||||
/* The file backend will never be multi-user... */
|
||||
be->events_pending = NULL;
|
||||
be->process_events = NULL;
|
||||
|
@ -156,9 +156,6 @@
|
||||
* data. Database backends should implement a more intelligent
|
||||
* solution.
|
||||
*
|
||||
* The counter() routine increments the named counter and returns the
|
||||
* post-incremented value. Returns -1 if there is a problem.
|
||||
*
|
||||
* The events_pending() routines should return true if there are
|
||||
* external events which need to be processed to bring the
|
||||
* engine up to date with the backend.
|
||||
@ -317,7 +314,6 @@ struct QofBackend_s
|
||||
void (*load_config) (QofBackend *, KvpFrame *);
|
||||
/*@ observer @*/
|
||||
KvpFrame* (*get_config) (QofBackend *);
|
||||
gint64 (*counter) (QofBackend *, const char *counter_name);
|
||||
|
||||
gboolean (*events_pending) (QofBackend *);
|
||||
gboolean (*process_events) (QofBackend *);
|
||||
|
@ -409,12 +409,7 @@ qof_book_get_counter (QofBook *book, const char *counter_name)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If we've got a backend with a counter method, call it */
|
||||
be = book->backend;
|
||||
if (be && be->counter)
|
||||
return ((be->counter)(be, counter_name));
|
||||
|
||||
/* If not, then use the KVP in the book */
|
||||
/* Use the KVP in the book */
|
||||
kvp = qof_book_get_slots (book);
|
||||
|
||||
if (!kvp)
|
||||
|
Loading…
Reference in New Issue
Block a user