r19932 - gnucash/trunk/src - Replace obsolete <QueryNew.h> #defines by the current <qof.h> function names.

Christian Stimming cstim at code.gnucash.org
Sun Dec 12 16:31:00 EST 2010


Author: cstim
Date: 2010-12-12 16:30:59 -0500 (Sun, 12 Dec 2010)
New Revision: 19932
Trac: http://svn.gnucash.org/trac/changeset/19932

Removed:
   gnucash/trunk/src/engine/QueryNew.h
Modified:
   gnucash/trunk/src/backend/xml/io-gncxml-v1.c
   gnucash/trunk/src/business/business-gnome/dialog-customer.c
   gnucash/trunk/src/business/business-gnome/dialog-employee.c
   gnucash/trunk/src/business/business-gnome/dialog-invoice.c
   gnucash/trunk/src/business/business-gnome/dialog-job.c
   gnucash/trunk/src/business/business-gnome/dialog-order.c
   gnucash/trunk/src/business/business-gnome/dialog-vendor.c
   gnucash/trunk/src/business/business-gnome/search-owner.h
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c
   gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
   gnucash/trunk/src/engine/CMakeLists.txt
   gnucash/trunk/src/engine/Makefile.am
   gnucash/trunk/src/engine/gncIDSearch.c
   gnucash/trunk/src/engine/gncIDSearch.h
   gnucash/trunk/src/experimental/cgi-bin/hello2.c
   gnucash/trunk/src/gnome-search/dialog-search.c
   gnucash/trunk/src/gnome-search/dialog-search.h
   gnucash/trunk/src/gnome-search/gnc-general-search.c
   gnucash/trunk/src/gnome-search/search-account.h
   gnucash/trunk/src/gnome-search/search-boolean.h
   gnucash/trunk/src/gnome-search/search-core-type.c
   gnucash/trunk/src/gnome-search/search-core-type.h
   gnucash/trunk/src/gnome-search/search-date.h
   gnucash/trunk/src/gnome-search/search-double.h
   gnucash/trunk/src/gnome-search/search-int64.h
   gnucash/trunk/src/gnome-search/search-numeric.h
   gnucash/trunk/src/gnome-utils/dialog-query-list.c
   gnucash/trunk/src/gnome-utils/gnc-query-list.c
   gnucash/trunk/src/gnome/dialog-find-transactions.c
   gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register.c
   gnucash/trunk/src/gnome/gnc-split-reg.c
   gnucash/trunk/src/gnome/reconcile-list.c
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
Log:
Replace obsolete <QueryNew.h> #defines by the current <qof.h> function names.

Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -2363,7 +2363,7 @@
     g_return_val_if_fail(qand, FALSE);
 
     /* append the and terms by or'ing them in ... */
-    qret = qof_query_merge (q, qand, QUERY_OR);
+    qret = qof_query_merge (q, qand, QOF_QUERY_OR);
     if (!qret)
     {
         qof_query_destroy(qand);
@@ -2509,7 +2509,7 @@
     g_return_val_if_fail(q, FALSE);
     g_return_val_if_fail(dp, FALSE);
 
-    xaccQueryAddPredicate (q, dp, QUERY_AND);
+    xaccQueryAddPredicate (q, dp, QOF_QUERY_AND);
 
     return(TRUE);
 }

Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -72,7 +72,7 @@
 struct _customer_select_window
 {
     QofBook *	book;
-    QueryNew *	q;
+    QofQuery *	q;
 };
 
 struct _customer_window
@@ -783,14 +783,14 @@
 
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
 GNCSearchWindow *
 gnc_customer_search (GncCustomer *start, QofBook *book)
 {
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     GNCIdType type = GNC_CUSTOMER_MODULE_NAME;
     struct _customer_select_window *sw;
     static GList *params = NULL;
@@ -833,15 +833,15 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
 #if 0
     if (start)
     {
-        q2 = gncQueryCopy (q);
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncCustomerGetGUID (start), QUERY_AND);
+        q2 = qof_query_copy (q);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncCustomerGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-employee.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-employee.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -68,7 +68,7 @@
 struct _employee_select_window
 {
     QofBook *	book;
-    QueryNew *	q;
+    QofQuery *	q;
 };
 
 struct _employee_window
@@ -690,7 +690,7 @@
 
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
@@ -699,7 +699,7 @@
 {
     GNCIdType type = GNC_EMPLOYEE_MODULE_NAME;
     struct _employee_select_window *sw;
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     static GList *params = NULL;
     static GList *columns = NULL;
     static GNCSearchCallbackButton buttons[] =
@@ -735,15 +735,15 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
 #if 0
     if (start)
     {
-        q2 = gncQueryCopy (q);
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncEmployeeGetGUID (start), QUERY_AND);
+        q2 = qof_query_copy (q);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncEmployeeGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -32,7 +32,7 @@
 
 #include "gncObject.h"
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
@@ -111,7 +111,7 @@
 {
     QofBook *	book;
     GncOwner *	owner;
-    QueryNew *	q;
+    QofQuery *	q;
     GncOwner	owner_def;
 };
 
@@ -912,7 +912,7 @@
 void
 gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code)
 {
-    QueryNew *query = gnc_entry_ledger_get_query (iw->ledger);
+    QofQuery *query = gnc_entry_ledger_get_query (iw->ledger);
     GSList *p1 = NULL, *p2 = NULL, *p3 = NULL, *standard;
 
     if (iw->last_sort == sort_code)
@@ -951,7 +951,7 @@
         g_return_if_fail (FALSE);
     }
 
-    gncQuerySetSortOrder (query, p1, p2, p3);
+    qof_query_set_sort_order (query, p1, p2, p3);
     iw->last_sort = sort_code;
     gnc_entry_ledger_display_refresh (iw->ledger);
 }
@@ -2366,7 +2366,7 @@
 
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
@@ -2375,7 +2375,7 @@
 {
     GNCIdType type = GNC_INVOICE_MODULE_NAME;
     struct _invoice_select_window *sw;
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     GncOwnerType owner_type = GNC_OWNER_CUSTOMER;
     static GList *inv_params = NULL, *bill_params = NULL, *emp_params = NULL, *params;
     static GList *columns = NULL;
@@ -2532,8 +2532,8 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
     /* If owner is supplied, limit all searches to invoices who's owner
      * or end-owner is the supplied owner!  Show all invoices by this
@@ -2561,20 +2561,20 @@
          */
         if (gncOwnerGetGUID (owner))
         {
-            q2 = gncQueryCreate ();
-            gncQueryAddGUIDMatch (q2, g_slist_prepend
-                                  (g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                                   INVOICE_OWNER),
-                                  gncOwnerGetGUID (owner), QUERY_OR);
+            q2 = qof_query_create ();
+            qof_query_add_guid_match (q2, g_slist_prepend
+                                      (g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                       INVOICE_OWNER),
+                                      gncOwnerGetGUID (owner), QOF_QUERY_OR);
 
-            gncQueryAddGUIDMatch (q2, g_slist_prepend
-                                  (g_slist_prepend (NULL, OWNER_PARENTG),
-                                   INVOICE_OWNER),
-                                  gncOwnerGetGUID (owner), QUERY_OR);
+            qof_query_add_guid_match (q2, g_slist_prepend
+                                      (g_slist_prepend (NULL, OWNER_PARENTG),
+                                       INVOICE_OWNER),
+                                      gncOwnerGetGUID (owner), QOF_QUERY_OR);
 
-            gncQueryMergeInPlace (q, q2, QUERY_AND);
-            gncQueryDestroy (q2);
-            q2 = gncQueryCopy (q);
+            qof_query_merge_in_place (q, q2, QOF_QUERY_AND);
+            qof_query_destroy (q2);
+            q2 = qof_query_copy (q);
         }
         else
         {
@@ -2584,7 +2584,7 @@
                             gncInvoiceGetTypeFromOwnerType(owner_type),
                             QOF_STRING_MATCH_NORMAL, FALSE);
             param_list = g_slist_prepend (param_list, INVOICE_TYPE);
-            gncQueryAddTerm (q, param_list, inv_type_pred, QOF_QUERY_AND);
+            qof_query_add_term (q, param_list, inv_type_pred, QOF_QUERY_AND);
         }
     }
 
@@ -2592,10 +2592,10 @@
     if (start)
     {
         if (q2 == NULL)
-            q2 = gncQueryCopy (q);
+            q2 = qof_query_copy (q);
 
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncInvoiceGetGUID (start), QUERY_AND);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncInvoiceGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 
@@ -2695,9 +2695,9 @@
     }
 
     /* Create the query to search for invoices; set the book */
-    q = gncQueryCreate();
-    gncQuerySearchFor(q, GNC_INVOICE_MODULE_NAME);
-    gncQuerySetBook (q, book);
+    q = qof_query_create();
+    qof_query_search_for(q, GNC_INVOICE_MODULE_NAME);
+    qof_query_set_book (q, book);
 
     /* we want to find all invoices where:
      *      invoice -> is_posted == TRUE
@@ -2706,18 +2706,18 @@
      * AND  invoice -> due >= (today - days_in_advance)
      */
 
-    gncQueryAddBooleanMatch (q, g_slist_prepend(NULL, INVOICE_IS_POSTED), TRUE,
-                             QUERY_AND);
+    qof_query_add_boolean_match (q, g_slist_prepend(NULL, INVOICE_IS_POSTED), TRUE,
+                                 QOF_QUERY_AND);
 
-    gncQueryAddBooleanMatch (q, g_slist_prepend(g_slist_prepend(NULL, LOT_IS_CLOSED),
-                             INVOICE_POST_LOT), FALSE, QUERY_AND);
+    qof_query_add_boolean_match (q, g_slist_prepend(g_slist_prepend(NULL, LOT_IS_CLOSED),
+                                 INVOICE_POST_LOT), FALSE, QOF_QUERY_AND);
 
     /* Watch out: Do *not* translate the string "Invoice" here because
        it must match the QofObject.type_label string exactly, which
        implies it is used in untranslated form! */
     pred_data = gncQueryStringPredicate (COMPARE_NEQ, "Invoice",
                                          STRING_MATCH_NORMAL, FALSE);
-    gncQueryAddTerm (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QUERY_AND);
+    qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_TYPE), pred_data, QOF_QUERY_AND);
 
     end_date = time(NULL);
     if (days_in_advance < 0)
@@ -2727,9 +2727,9 @@
     ts.tv_sec = (gint64) end_date;
     ts.tv_nsec = 0;
     pred_data = gncQueryDatePredicate (COMPARE_LTE, DATE_MATCH_NORMAL, ts);
-    gncQueryAddTerm (q, g_slist_prepend(NULL, INVOICE_DUE), pred_data, QUERY_AND);
+    qof_query_add_term (q, g_slist_prepend(NULL, INVOICE_DUE), pred_data, QOF_QUERY_AND);
 
-    res = gncQueryRun(q);
+    res = qof_query_run(q);
     len = g_list_length (res);
     if (!res || len <= 0)
         return NULL;

Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -64,7 +64,7 @@
 {
     QofBook *	book;
     GncOwner *	owner;
-    QueryNew *	q;
+    QofQuery *	q;
     GncOwner	owner_def;
 };
 
@@ -519,14 +519,14 @@
 
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
 GNCSearchWindow *
 gnc_job_search (GncJob *start, GncOwner *owner, QofBook *book)
 {
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     GNCIdType type = GNC_JOB_MODULE_NAME;
     struct _job_select_window *sw;
     static GList *params = NULL;
@@ -570,8 +570,8 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
     /* If we have a start job but, for some reason, not an owner -- grab
      * the owner from the starting job.
@@ -584,22 +584,22 @@
      */
     if (owner && gncOwnerGetGUID (owner))
     {
-        gncQueryAddGUIDMatch (q, g_slist_prepend
-                              (g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                               JOB_OWNER),
-                              gncOwnerGetGUID (owner), QUERY_AND);
+        qof_query_add_guid_match (q, g_slist_prepend
+                                  (g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                   JOB_OWNER),
+                                  gncOwnerGetGUID (owner), QOF_QUERY_AND);
 
-        q2 = gncQueryCopy (q);
+        q2 = qof_query_copy (q);
     }
 
 #if 0
     if (start)
     {
         if (q2 == NULL)
-            q2 = gncQueryCopy (q);
+            q2 = qof_query_copy (q);
 
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncJobGetGUID (start), QUERY_AND);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncJobGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -70,7 +70,7 @@
 {
     QofBook *	book;
     GncOwner *	owner;
-    QueryNew *	q;
+    QofQuery *	q;
     GncOwner	owner_def;
 };
 
@@ -814,7 +814,7 @@
 
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
@@ -823,7 +823,7 @@
 {
     GNCIdType type = GNC_ORDER_MODULE_NAME;
     struct _order_select_window *sw;
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     static GList *params = NULL;
     static GList *columns = NULL;
     static GNCSearchCallbackButton buttons[] =
@@ -868,41 +868,41 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
     /* If owner is supplied, limit all searches to orders who's owner
      * (or parent) is the supplied owner!
      */
     if (owner && gncOwnerGetGUID (owner))
     {
-        QueryNew *tmp, *q3;
+        QofQuery *tmp, *q3;
 
-        q3 = gncQueryCreateFor (type);
-        gncQueryAddGUIDMatch (q3, g_slist_prepend
-                              (g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                               ORDER_OWNER),
-                              gncOwnerGetGUID (owner), QUERY_OR);
-        gncQueryAddGUIDMatch (q3, g_slist_prepend
-                              (g_slist_prepend (NULL, OWNER_PARENTG),
-                               ORDER_OWNER),
-                              gncOwnerGetGUID (owner), QUERY_OR);
+        q3 = qof_query_create_for (type);
+        qof_query_add_guid_match (q3, g_slist_prepend
+                                  (g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                   ORDER_OWNER),
+                                  gncOwnerGetGUID (owner), QOF_QUERY_OR);
+        qof_query_add_guid_match (q3, g_slist_prepend
+                                  (g_slist_prepend (NULL, OWNER_PARENTG),
+                                   ORDER_OWNER),
+                                  gncOwnerGetGUID (owner), QOF_QUERY_OR);
 
-        tmp = gncQueryMerge (q, q3, QUERY_AND);
-        gncQueryDestroy (q);
-        gncQueryDestroy (q3);
+        tmp = qof_query_merge (q, q3, QOF_QUERY_AND);
+        qof_query_destroy (q);
+        qof_query_destroy (q3);
         q = tmp;
-        q2 = gncQueryCopy (q);
+        q2 = qof_query_copy (q);
     }
 
 #if 0
     if (start)
     {
         if (q2 == NULL)
-            q2 = gncQueryCopy (q);
+            q2 = qof_query_copy (q);
 
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncOrderGetGUID (start), QUERY_AND);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncOrderGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 

Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -68,7 +68,7 @@
 struct _vendor_select_window
 {
     QofBook *	book;
-    QueryNew *	q;
+    QofQuery *	q;
 };
 
 struct _vendor_window
@@ -645,7 +645,7 @@
     struct _vendor_select_window *sw = user_data;
     g_return_if_fail (sw);
 
-    gncQueryDestroy (sw->q);
+    qof_query_destroy (sw->q);
     g_free (sw);
 }
 
@@ -654,7 +654,7 @@
 {
     GNCIdType type = GNC_VENDOR_MODULE_NAME;
     struct _vendor_select_window *sw;
-    QueryNew *q, *q2 = NULL;
+    QofQuery *q, *q2 = NULL;
     static GList *params = NULL;
     static GList *columns = NULL;
     static GNCSearchCallbackButton buttons[] =
@@ -693,15 +693,15 @@
     }
 
     /* Build the queries */
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
 
 #if 0
     if (start)
     {
-        q2 = gncQueryCopy (q);
-        gncQueryAddGUIDMatch (q2, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              gncVendorGetGUID (start), QUERY_AND);
+        q2 = qof_query_copy (q);
+        qof_query_add_guid_match (q2, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  gncVendorGetGUID (start), QOF_QUERY_AND);
     }
 #endif
 

Modified: gnucash/trunk/src/business/business-gnome/search-owner.h
===================================================================
--- gnucash/trunk/src/business/business-gnome/search-owner.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-gnome/search-owner.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_OWNER_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_OWNER (gnc_search_owner_get_type ())
 #define GNCSEARCH_OWNER(obj)	GTK_CHECK_CAST (obj, gnc_search_owner_get_type (), GNCSearchOwner)

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -376,7 +376,7 @@
     gnc_entry_ledger_clear_blank_entry (ledger);
     gnc_entry_ledger_display_fini (ledger);
     gnc_table_destroy (ledger->table);
-    gncQueryDestroy (ledger->query);
+    qof_query_destroy (ledger->query);
     g_free (ledger);
 }
 
@@ -394,27 +394,27 @@
 
     if (!ledger->query && order)
     {
-        ledger->query = gncQueryCreateFor (GNC_ENTRY_MODULE_NAME);
-        gncQuerySetBook (ledger->query, gncOrderGetBook (order));
-        gncQueryAddGUIDMatch (ledger->query,
-                              g_slist_prepend (g_slist_prepend (NULL,
-                                               QUERY_PARAM_GUID),
-                                               ENTRY_ORDER),
-                              gncOrderGetGUID (order), QUERY_AND);
+        ledger->query = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
+        qof_query_set_book (ledger->query, gncOrderGetBook (order));
+        qof_query_add_guid_match (ledger->query,
+                                  g_slist_prepend (g_slist_prepend (NULL,
+                                          QOF_PARAM_GUID),
+                                          ENTRY_ORDER),
+                                  gncOrderGetGUID (order), QOF_QUERY_AND);
     }
     gnc_entry_ledger_display_refresh (ledger);
 }
 
 static void create_invoice_query (GncEntryLedger *ledger)
 {
-    QueryNew *q, *q1;
+    QofQuery *q, *q1;
     char * type = NULL;
 
     if (!ledger->invoice)
         return;
 
     if (ledger->query)
-        gncQueryDestroy (ledger->query);
+        qof_query_destroy (ledger->query);
 
     /* Match:   (where I-TYPE == Invoice or Bill)
      *
@@ -436,8 +436,8 @@
      */
 
     /* Term 1 */
-    ledger->query = gncQueryCreateFor (GNC_ENTRY_MODULE_NAME);
-    gncQuerySetBook (ledger->query, gncInvoiceGetBook (ledger->invoice));
+    ledger->query = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
+    qof_query_set_book (ledger->query, gncInvoiceGetBook (ledger->invoice));
 
     /* Term 2 */
     switch (ledger->type)
@@ -458,9 +458,9 @@
         break;
     }
 
-    q = gncQueryCreateFor (GNC_ENTRY_MODULE_NAME);
-    gncQueryAddGUIDMatch (q, gncQueryBuildParamList (type, QUERY_PARAM_GUID, NULL),
-                          gncInvoiceGetGUID (ledger->invoice), QUERY_OR);
+    q = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
+    qof_query_add_guid_match (q, qof_query_build_param_list (type, QOF_PARAM_GUID, NULL),
+                              gncInvoiceGetGUID (ledger->invoice), QOF_QUERY_OR);
 
     /* Term 3 */
     if (ledger->type == GNCENTRY_INVOICE_ENTRY &&
@@ -469,52 +469,52 @@
 
         const GncGUID *invoice_parent =
             gncOwnerGetGUID (gncInvoiceGetOwner (ledger->invoice));
-        QueryNew *q2 = gncQueryCreateFor (GNC_ENTRY_MODULE_NAME);
+        QofQuery *q2 = qof_query_create_for (GNC_ENTRY_MODULE_NAME);
 
         /*
          * Entry->BillTo == Invoice->parent OR
          * ( Entry->BillTo == NULL AND Entry->Bill->BillTo == Invoice->parent )
          */
 
-        gncQueryAddGUIDMatch (q2, gncQueryBuildParamList (ENTRY_BILLTO,
-                              QUERY_PARAM_GUID, NULL),
-                              NULL, QUERY_AND);
-        gncQueryAddGUIDMatch (q2, gncQueryBuildParamList (ENTRY_BILL, INVOICE_BILLTO,
-                              QUERY_PARAM_GUID, NULL),
-                              invoice_parent, QUERY_AND);
-        gncQueryAddGUIDMatch (q2, gncQueryBuildParamList (ENTRY_BILLTO,
-                              QUERY_PARAM_GUID, NULL),
-                              invoice_parent, QUERY_OR);
+        qof_query_add_guid_match (q2, qof_query_build_param_list (ENTRY_BILLTO,
+                                  QOF_PARAM_GUID, NULL),
+                                  NULL, QOF_QUERY_AND);
+        qof_query_add_guid_match (q2, qof_query_build_param_list (ENTRY_BILL, INVOICE_BILLTO,
+                                  QOF_PARAM_GUID, NULL),
+                                  invoice_parent, QOF_QUERY_AND);
+        qof_query_add_guid_match (q2, qof_query_build_param_list (ENTRY_BILLTO,
+                                  QOF_PARAM_GUID, NULL),
+                                  invoice_parent, QOF_QUERY_OR);
 
         /* Entry->Billable == TRUE AND Entry->Bill->Is-Posted? == TRUE */
-        gncQueryAddBooleanMatch (q2, gncQueryBuildParamList (ENTRY_BILLABLE, NULL),
-                                 TRUE, QUERY_AND);
-        gncQueryAddBooleanMatch (q2, gncQueryBuildParamList (ENTRY_BILL,
-                                 INVOICE_IS_POSTED, NULL),
-                                 TRUE, QUERY_AND);
+        qof_query_add_boolean_match (q2, qof_query_build_param_list (ENTRY_BILLABLE, NULL),
+                                     TRUE, QOF_QUERY_AND);
+        qof_query_add_boolean_match (q2, qof_query_build_param_list (ENTRY_BILL,
+                                     INVOICE_IS_POSTED, NULL),
+                                     TRUE, QOF_QUERY_AND);
 
         /* Entry->Order->real-parent == Invoice->parent */
-        gncQueryAddGUIDMatch (q2, gncQueryBuildParamList (ENTRY_ORDER, ORDER_OWNER,
-                              OWNER_PARENTG, NULL),
-                              invoice_parent, QUERY_OR);
+        qof_query_add_guid_match (q2, qof_query_build_param_list (ENTRY_ORDER, ORDER_OWNER,
+                                  OWNER_PARENTG, NULL),
+                                  invoice_parent, QOF_QUERY_OR);
 
         /* Entry->Invoice == NULL */
-        gncQueryAddGUIDMatch (q2, gncQueryBuildParamList (ENTRY_INVOICE,
-                              QUERY_PARAM_GUID, NULL),
-                              NULL, QUERY_AND);
+        qof_query_add_guid_match (q2, qof_query_build_param_list (ENTRY_INVOICE,
+                                  QOF_PARAM_GUID, NULL),
+                                  NULL, QOF_QUERY_AND);
 
 
         /* Combine terms 2 and 3 */
-        q1 = gncQueryMerge (q, q2, QUERY_OR);
-        gncQueryDestroy (q);
-        gncQueryDestroy (q2);
+        q1 = qof_query_merge (q, q2, QOF_QUERY_OR);
+        qof_query_destroy (q);
+        qof_query_destroy (q2);
         q = q1;
     }
 
     /* Combine terms 1 and 2 */
-    q1 = gncQueryMerge (ledger->query, q, QUERY_AND);
-    gncQueryDestroy (q);
-    gncQueryDestroy (ledger->query);
+    q1 = qof_query_merge (ledger->query, q, QOF_QUERY_AND);
+    qof_query_destroy (q);
+    qof_query_destroy (ledger->query);
     ledger->query = q1;
 }
 
@@ -882,7 +882,7 @@
     return;
 }
 
-QueryNew *
+QofQuery *
 gnc_entry_ledger_get_query (GncEntryLedger *ledger)
 {
     if (!ledger)

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedger.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedger.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedger.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -24,7 +24,7 @@
 #ifndef GNC_ENTRY_LEDGER_H
 #define GNC_ENTRY_LEDGER_H
 
-#include "QueryNew.h"
+#include "qof.h"
 #include "gncEntry.h"
 #include "gncOrder.h"
 #include "table-allgui.h"
@@ -138,7 +138,7 @@
 void gnc_entry_ledger_delete_current_entry (GncEntryLedger *ledger);
 void gnc_entry_ledger_duplicate_current_entry (GncEntryLedger *ledger);
 
-QueryNew * gnc_entry_ledger_get_query (GncEntryLedger *ledger);
+QofQuery * gnc_entry_ledger_get_query (GncEntryLedger *ledger);
 
 void gnc_entry_ledger_set_gconf_section (GncEntryLedger *ledger, const gchar *string);
 

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -256,8 +256,8 @@
     g_assert(desc);
 
     /* The query itself and its book */
-    query = gncQueryCreateFor (GNC_ID_ENTRY);
-    gncQuerySetBook (query, reg->book);
+    query = qof_query_create_for (GNC_ID_ENTRY);
+    qof_query_set_book (query, reg->book);
 
     /* Predicate data: We want to compare one string, namely the given
      * argument */

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerDisplay.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -41,7 +41,7 @@
 gnc_entry_ledger_get_entries (GncEntryLedger *ledger)
 {
     if (ledger->query)
-        return gncQueryRun (ledger->query);
+        return qof_query_run (ledger->query);
 
     //  g_warning ("No query to run?");
     return NULL;

Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerP.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -47,7 +47,7 @@
     Table *	table;
     GncOrder *	order;
     GncInvoice *	invoice;
-    QueryNew *	query;
+    QofQuery *	query;
 
     GncEntryLedgerType type;
 

Modified: gnucash/trunk/src/engine/CMakeLists.txt
===================================================================
--- gnucash/trunk/src/engine/CMakeLists.txt	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/engine/CMakeLists.txt	2010-12-12 21:30:59 UTC (rev 19932)
@@ -25,7 +25,6 @@
   SX-book.h
   SX-ttinfo.h
   Query.h
-  QueryNew.h
   QueryObject.h
   QueryCore.h
   Scrub.h

Modified: gnucash/trunk/src/engine/Makefile.am
===================================================================
--- gnucash/trunk/src/engine/Makefile.am	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/engine/Makefile.am	2010-12-12 21:30:59 UTC (rev 19932)
@@ -72,7 +72,6 @@
   SX-book.h \
   SX-ttinfo.h \
   Query.h \
-  QueryNew.h \
   QueryObject.h \
   QueryCore.h \
   Scrub.h \

Deleted: gnucash/trunk/src/engine/QueryNew.h
===================================================================
--- gnucash/trunk/src/engine/QueryNew.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/engine/QueryNew.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -1,48 +0,0 @@
-#include "qof.h"
-
-
-#define QUERY_AND QOF_QUERY_AND
-#define QUERY_OR QOF_QUERY_OR
-#define QUERY_NAND QOF_QUERY_NAND
-#define QUERY_NOR QOF_QUERY_NOR
-#define QUERY_XOR QOF_QUERY_XOR
-#define QUERY_PARAM_BOOK QOF_PARAM_BOOK
-#define QUERY_PARAM_GUID QOF_PARAM_GUID
-#define QUERY_PARAM_ACTIVE QOF_PARAM_ACTIVE
-
-#define querynew_s _QofQuery
-#define QueryNew QofQuery
-#define QueryOp QofQueryOp
-#define query_new_term _QofQueryTerm
-#define query_new_sort _QofSortFunc
-
-#define gncQueryBuildParamList qof_query_build_param_list
-#define gncQueryCreate qof_query_create
-#define gncQueryCreateFor qof_query_create_for
-#define gncQueryDestroy qof_query_destroy
-#define gncQuerySearchFor qof_query_search_for
-#define gncQuerySetBook qof_query_set_book
-#define gncQueryAddTerm qof_query_add_term
-#define gncQueryAddGUIDMatch qof_query_add_guid_match
-#define gncQueryAddGUIDListMatch qof_query_add_guid_list_match
-#define gncQueryAddBooleanMatch qof_query_add_boolean_match
-#define gncQueryRun qof_query_run
-#define gncQueryLastRun qof_query_last_run
-#define gncQueryClear qof_query_clear
-#define gncQueryPurgeTerms qof_query_purge_terms
-#define gncQueryHasTerms qof_query_has_terms
-#define gncQueryNumTerms qof_query_num_terms
-#define gncQueryHasTermType qof_query_has_term_type
-#define gncQueryCopy qof_query_copy
-#define gncQueryInvert qof_query_invert
-#define gncQueryMerge qof_query_merge
-#define gncQueryMergeInPlace qof_query_merge_in_place
-#define gncQuerySetSortOrder qof_query_set_sort_order
-#define gncQuerySetSortOptions qof_query_set_sort_options
-#define gncQuerySetSortIncreasing qof_query_set_sort_increasing
-#define gncQuerySetMaxResults qof_query_set_max_results
-#define gncQueryEqual qof_query_equal
-#define gncQueryPrint qof_query_print
-#define gncQueryGetSearchFor qof_query_get_search_for
-#define gncQueryGetBooks qof_query_get_books
-

Modified: gnucash/trunk/src/engine/gncIDSearch.c
===================================================================
--- gnucash/trunk/src/engine/gncIDSearch.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/engine/gncIDSearch.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -77,7 +77,7 @@
 {
     void *c;
     GList *result;
-    QueryNew *q;
+    QofQuery *q;
     gint len;
     QueryPredData_t string_pred_data;
     g_return_val_if_fail (type, NULL);
@@ -85,29 +85,29 @@
     g_return_val_if_fail (book, NULL);
 
     // Build the query
-    q = gncQueryCreateFor (type);
-    gncQuerySetBook (q, book);
+    q = qof_query_create_for (type);
+    qof_query_set_book (q, book);
     // Search only the id field
     string_pred_data = gncQueryStringPredicate (COMPARE_EQUAL, id, STRING_MATCH_NORMAL, FALSE);
 
     if (strcmp(type, GNC_CUSTOMER_MODULE_NAME))
     {
         GncCustomer *c = NULL;
-        gncQueryAddTerm (q, gncQueryBuildParamList("CUSTOMER_ID"), string_pred_data, QUERY_AND);
+        qof_query_add_term (q, qof_query_build_param_list("CUSTOMER_ID"), string_pred_data, QOF_QUERY_AND);
     }
     else if (strcmp(type, GNC_INVOICE_MODULE_NAME))
     {
         GncInvoice *c = NULL;
-        gncQueryAddTerm (q, gncQueryBuildParamList("INVOICE_ID"), string_pred_data, QUERY_AND);
+        qof_query_add_term (q, qof_query_build_param_list("INVOICE_ID"), string_pred_data, QOF_QUERY_AND);
     }
     else if (strcmp(type, GNC_VENDOR_MODULE_NAME))
     {
         GncVendor *c = NULL;
-        gncQueryAddTerm (q, gncQueryBuildParamList("VENDOR_ID"), string_pred_data, QUERY_AND);
+        qof_query_add_term (q, qof_query_build_param_list("VENDOR_ID"), string_pred_data, QOF_QUERY_AND);
     }
 
     // Run the query
-    result = gncQueryRun (q);
+    result = qof_query_run (q);
 
     // now compare _exactly_
     len = g_list_length (result);
@@ -126,6 +126,6 @@
             result = g_list_next (result);
         }
     }
-    gncQueryDestroy (q);
+    qof_query_destroy (q);
     return object;
 }

Modified: gnucash/trunk/src/engine/gncIDSearch.h
===================================================================
--- gnucash/trunk/src/engine/gncIDSearch.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/engine/gncIDSearch.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -33,7 +33,7 @@
 #include "gncBusiness.h"
 // query
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "GNCId.h"
 
 

Modified: gnucash/trunk/src/experimental/cgi-bin/hello2.c
===================================================================
--- gnucash/trunk/src/experimental/cgi-bin/hello2.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/experimental/cgi-bin/hello2.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -66,7 +66,7 @@
     /* In real life, we would use a query as specified by the user */
     xaccQueryAddDateMatch (q, TRUE, 28, 2, 1982,
                            FALSE, 16, 10, 2010,
-                           QUERY_OR);
+                           QOF_QUERY_OR);
 
     split_list = qof_query_run (q);
 

Modified: gnucash/trunk/src/gnome/dialog-find-transactions.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-find-transactions.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome/dialog-find-transactions.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -29,7 +29,7 @@
 #include "gnc-ui-util.h"
 #include "Query.h"
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "QueryObject.h"
 #include "SX-book.h"
 #include "Transaction.h"
@@ -42,13 +42,13 @@
 
 struct _ftd_data
 {
-    QueryNew *		q;
-    QueryNew *		ledger_q;
+    QofQuery *		q;
+    QofQuery *		ledger_q;
     GNCSearchWindow *	sw;
 };
 
 static void
-do_find_cb (QueryNew *query, gpointer user_data, gpointer *result)
+do_find_cb (QofQuery *query, gpointer user_data, gpointer *result)
 {
     struct _ftd_data *ftd = user_data;
     GNCLedgerDisplay *ledger;
@@ -73,7 +73,7 @@
         gnc_main_window_open_page (NULL, page);
     }
 
-    gncQueryDestroy (ftd->q);
+    qof_query_destroy (ftd->q);
 
     gnc_search_dialog_destroy (ftd->sw);
 }
@@ -95,7 +95,7 @@
     GNCIdType type = GNC_ID_SPLIT;
     struct _ftd_data *ftd;
     static GList *params = NULL;
-    QueryNew *start_q, *show_q = NULL;
+    QofQuery *start_q, *show_q = NULL;
 
     /* Build parameter list in reverse order */
     if (params == NULL)
@@ -105,7 +105,7 @@
                                            type, SPLIT_TRANS, TRANS_SPLITLIST,
                                            SPLIT_ACCOUNT_GUID, NULL);
         params = gnc_search_param_prepend (params, N_("Account"), GNC_ID_ACCOUNT,
-                                           type, SPLIT_ACCOUNT, QUERY_PARAM_GUID,
+                                           type, SPLIT_ACCOUNT, QOF_PARAM_GUID,
                                            NULL);
         params = gnc_search_param_prepend (params, N_("Balanced"), NULL,
                                            type, SPLIT_TRANS, TRANS_IS_BALANCED,
@@ -139,12 +139,12 @@
     if (orig_ledg)
     {
         ftd->ledger_q = gnc_ledger_display_get_query (orig_ledg);
-        start_q = show_q = gncQueryCopy (ftd->ledger_q);
+        start_q = show_q = qof_query_copy (ftd->ledger_q);
     }
     else
     {
-        start_q = gncQueryCreate ();
-        gncQuerySetBook (start_q, gnc_get_current_book ());
+        start_q = qof_query_create ();
+        qof_query_set_book (start_q, gnc_get_current_book ());
 
         /* In lieu of not "mis-using" some portion of the infrastructure by writing
          * a bunch of new code, we just filter out the accounts of the template
@@ -164,7 +164,7 @@
 
             tRoot = gnc_book_get_template_root( gnc_get_current_book() );
             al = gnc_account_get_descendants( tRoot );
-            xaccQueryAddAccountMatch( start_q, al, GUID_MATCH_NONE, QUERY_AND );
+            xaccQueryAddAccountMatch( start_q, al, GUID_MATCH_NONE, QOF_QUERY_AND );
             g_list_free (al);
             al = NULL;
             tRoot = NULL;

Modified: gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome/dialog-sx-since-last-run.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -43,7 +43,7 @@
 
 #include "gnc-ui-util.h"
 #include "Query.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "gnc-ledger-display.h"
 #include "gnc-plugin-page-register.h"
 #include "gnc-main-window.h"
@@ -1005,9 +1005,9 @@
     qof_query_set_book(book_query, gnc_get_current_book());
     for (guid_iter = created_txn_guids; guid_iter != NULL; guid_iter = guid_iter->next)
     {
-        xaccQueryAddGUIDMatch(guid_query, (GncGUID*)guid_iter->data, GNC_ID_TRANS, QUERY_OR);
+        xaccQueryAddGUIDMatch(guid_query, (GncGUID*)guid_iter->data, GNC_ID_TRANS, QOF_QUERY_OR);
     }
-    query = qof_query_merge(book_query, guid_query, QUERY_AND);
+    query = qof_query_merge(book_query, guid_query, QOF_QUERY_AND);
 
     // inspired by dialog-find-transactions:do_find_cb:
     ledger = gnc_ledger_display_query(query, SEARCH_LEDGER, REG_STYLE_JOURNAL);

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -70,7 +70,7 @@
 #include "gnucash-sheet.h"
 #include "lot-viewer.h"
 #include "Scrub.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "window-reconcile.h"
 #include "window-autoclear.h"
 #include "window-report.h"
@@ -1497,16 +1497,16 @@
     }
 
     /* Remove the old status match */
-    param_list = gncQueryBuildParamList (SPLIT_RECONCILE, NULL);
+    param_list = qof_query_build_param_list (SPLIT_RECONCILE, NULL);
     if (param_list)
     {
-        gncQueryPurgeTerms (query, param_list);
+        qof_query_purge_terms (query, param_list);
         g_slist_free(param_list);
     }
 
     /* Install the new status match */
     if (priv->fd.cleared_match != CLEARED_ALL)
-        xaccQueryAddClearedMatch(query, priv->fd.cleared_match, QUERY_AND);
+        xaccQueryAddClearedMatch(query, priv->fd.cleared_match, QOF_QUERY_AND);
 
     gnc_ledger_display_refresh (priv->ledger);
     LEAVE(" ");
@@ -1548,10 +1548,10 @@
     }
 
     /* Delete any existing old date spec. */
-    param_list = gncQueryBuildParamList(SPLIT_TRANS, TRANS_DATE_POSTED, NULL);
+    param_list = qof_query_build_param_list(SPLIT_TRANS, TRANS_DATE_POSTED, NULL);
     if (param_list)
     {
-        gncQueryPurgeTerms (query, param_list);
+        qof_query_purge_terms (query, param_list);
         g_slist_free(param_list);
     }
 
@@ -1561,7 +1561,7 @@
         xaccQueryAddDateMatchTT(query,
                                 priv->fd.start_time != 0, priv->fd.start_time,
                                 priv->fd.end_time != 0,   priv->fd.end_time,
-                                QUERY_AND);
+                                QOF_QUERY_AND);
     }
 
     gnc_ledger_display_refresh (priv->ledger);
@@ -3103,7 +3103,7 @@
     qof_query_set_book (query, gnc_get_current_book ());
 
     xaccQueryAddGUIDMatch (query, xaccSplitGetGUID (split),
-                           GNC_ID_SPLIT, QUERY_AND);
+                           GNC_ID_SPLIT, QOF_QUERY_AND);
 
     window = GNC_MAIN_WINDOW(GNC_PLUGIN_PAGE(plugin_page)->window);
     id = report_helper (priv->ledger, split, query);

Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-split-reg.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome/gnc-split-reg.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -34,7 +34,7 @@
 #include "gnc-split-reg.h"
 
 #include "Account.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "SX-book.h"
 #include "dialog-account.h"
 #include "dialog-sx-editor.h"
@@ -1612,7 +1612,7 @@
         g_return_if_fail (FALSE);
     }
 
-    gncQuerySetSortOrder( query, p1, p2, p3 );
+    qof_query_set_sort_order( query, p1, p2, p3 );
     reg = gnc_ledger_display_get_split_register( gsr->ledger );
     gnc_split_register_show_present_divider( reg, show_present_divider );
     gsr->sort_type = sort_code;

Modified: gnucash/trunk/src/gnome/reconcile-list.c
===================================================================
--- gnucash/trunk/src/gnome/reconcile-list.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome/reconcile-list.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -29,7 +29,7 @@
 
 #include "gnc-date.h"
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "Transaction.h"
 #include "gnc-ui-util.h"
 #include "gnc-gconf-utils.h"
@@ -151,7 +151,7 @@
     /* match the account */
     accounts = g_list_prepend (accounts, account);
 
-    xaccQueryAddAccountMatch (query, accounts, GUID_MATCH_ANY, QUERY_AND);
+    xaccQueryAddAccountMatch (query, accounts, GUID_MATCH_ANY, QOF_QUERY_AND);
 
     g_list_free (accounts);
 
@@ -159,14 +159,14 @@
     if (type == RECLIST_CREDIT)
         xaccQueryAddValueMatch(query, gnc_numeric_zero (),
                                NUMERIC_MATCH_CREDIT,
-                               COMPARE_GTE, QUERY_AND);
+                               COMPARE_GTE, QOF_QUERY_AND);
     else
         xaccQueryAddValueMatch(query, gnc_numeric_zero (),
                                NUMERIC_MATCH_DEBIT,
-                               COMPARE_GTE, QUERY_AND);
+                               COMPARE_GTE, QOF_QUERY_AND);
 
     /* limit the matches only to Cleared and Non-reconciled splits */
-    xaccQueryAddClearedMatch(query, CLEARED_NO | CLEARED_CLEARED, QUERY_AND);
+    xaccQueryAddClearedMatch(query, CLEARED_NO | CLEARED_CLEARED, QOF_QUERY_AND);
 
     /* initialize the QueryList */
     gnc_reconcile_list_construct (list, query);

Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/dialog-search.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -36,7 +36,7 @@
 #include "gnc-query-list.h"
 #include "gnc-gconf-utils.h"
 #include "gncObject.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "QueryObject.h"
 #include "QueryCore.h"
 
@@ -111,8 +111,8 @@
     int		search_type;	/* New, Narrow, Add, Delete */
 
     /* Our query status */
-    QueryNew *	q;
-    QueryNew *	start_q;	/* The query to start from, if any */
+    QofQuery *	q;
+    QofQuery *	start_q;	/* The query to start from, if any */
 
     /* The list of criteria */
     GNCSearchParam * last_param;
@@ -349,33 +349,33 @@
 search_update_query (GNCSearchWindow *sw)
 {
     static GSList *active_params = NULL;
-    QueryNew *q, *q2, *new_q;
+    QofQuery *q, *q2, *new_q;
     GList *node;
-    QueryOp op;
+    QofQueryOp op;
     QueryPredData_t pdata;
 
     if (sw->grouping == GNC_SEARCH_MATCH_ANY)
-        op = QUERY_OR;
+        op = QOF_QUERY_OR;
     else
-        op = QUERY_AND;
+        op = QOF_QUERY_AND;
 
     if (active_params == NULL)
-        active_params = g_slist_prepend (NULL, QUERY_PARAM_ACTIVE);
+        active_params = g_slist_prepend (NULL, QOF_PARAM_ACTIVE);
 
     /* Make sure we supply a book! */
     if (sw->start_q == NULL)
     {
-        sw->start_q = gncQueryCreateFor (sw->search_for);
-        gncQuerySetBook (sw->start_q, gnc_get_current_book ());
+        sw->start_q = qof_query_create_for (sw->search_for);
+        qof_query_set_book (sw->start_q, gnc_get_current_book ());
     }
     else
     {
         /* We've got a query -- purge it of any "active" parameters */
-        gncQueryPurgeTerms (sw->start_q, active_params);
+        qof_query_purge_terms (sw->start_q, active_params);
     }
 
     /* Now create a new query to work from */
-    q = gncQueryCreateFor (sw->search_for);
+    q = qof_query_create_for (sw->search_for);
 
     /* Walk the list of criteria */
     for (node = sw->crit_list; node; node = node->next)
@@ -384,8 +384,8 @@
 
         pdata = gnc_search_core_type_get_predicate (data->element);
         if (pdata)
-            gncQueryAddTerm (q, gnc_search_param_get_param_path (data->param),
-                             pdata, op);
+            qof_query_add_term (q, gnc_search_param_get_param_path (data->param),
+                                pdata, op);
     }
 
     /* Now combine this query with the existing query, depending on
@@ -396,22 +396,22 @@
     switch (sw->search_type)
     {
     case 0:			/* New */
-        new_q = gncQueryMerge (sw->start_q, q, QUERY_AND);
-        gncQueryDestroy (q);
+        new_q = qof_query_merge (sw->start_q, q, QOF_QUERY_AND);
+        qof_query_destroy (q);
         break;
     case 1:			/* Refine */
-        new_q = gncQueryMerge (sw->q, q, QUERY_AND);
-        gncQueryDestroy (q);
+        new_q = qof_query_merge (sw->q, q, QOF_QUERY_AND);
+        qof_query_destroy (q);
         break;
     case 2:			/* Add */
-        new_q = gncQueryMerge (sw->q, q, QUERY_OR);
-        gncQueryDestroy (q);
+        new_q = qof_query_merge (sw->q, q, QOF_QUERY_OR);
+        qof_query_destroy (q);
         break;
     case 3:			/* Delete */
-        q2 = gncQueryInvert (q);
-        new_q = gncQueryMerge (sw->q, q2, QUERY_AND);
-        gncQueryDestroy (q2);
-        gncQueryDestroy (q);
+        q2 = qof_query_invert (q);
+        new_q = qof_query_merge (sw->q, q2, QOF_QUERY_AND);
+        qof_query_destroy (q2);
+        qof_query_destroy (q);
         break;
     default:
         g_warning ("bad search type: %d", sw->search_type);
@@ -421,13 +421,13 @@
 
     if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sw->active_only_check)))
     {
-        gncQueryAddBooleanMatch (new_q, active_params, TRUE, QUERY_AND);
+        qof_query_add_boolean_match (new_q, active_params, TRUE, QOF_QUERY_AND);
         active_params = NULL;
     }
 
     /* Destroy the old query */
     if (sw->q)
-        gncQueryDestroy (sw->q);
+        qof_query_destroy (sw->q);
 
     /* And save the new one */
     sw->q = new_q;
@@ -523,21 +523,21 @@
     if (res)
     {
         const GncGUID *guid = (const GncGUID *) ((sw->get_guid->param_getfcn)(res, sw->get_guid));
-        QueryOp op = QUERY_OR;
+        QofQueryOp op = QOF_QUERY_OR;
 
         if (!sw->q)
         {
             if (!sw->start_q)
             {
-                sw->start_q = gncQueryCreateFor (sw->search_for);
-                gncQuerySetBook (sw->start_q, gnc_get_current_book ());
+                sw->start_q = qof_query_create_for (sw->search_for);
+                qof_query_set_book (sw->start_q, gnc_get_current_book ());
             }
-            sw->q = gncQueryCopy (sw->start_q);
-            op = QUERY_AND;
+            sw->q = qof_query_copy (sw->start_q);
+            op = QOF_QUERY_AND;
         }
 
-        gncQueryAddGUIDMatch (sw->q, g_slist_prepend (NULL, QUERY_PARAM_GUID),
-                              guid, op);
+        qof_query_add_guid_match (sw->q, g_slist_prepend (NULL, QOF_PARAM_GUID),
+                                  guid, op);
 
         /* Watch this entity so we'll refresh once it's actually changed */
         gnc_gui_component_watch_entity (sw->component_id, guid, QOF_EVENT_MODIFY);
@@ -793,8 +793,8 @@
     g_list_free (sw->crit_list);
 
     /* Destroy the queries */
-    if (sw->q) gncQueryDestroy (sw->q);
-    if (sw->start_q) gncQueryDestroy (sw->start_q);
+    if (sw->q) qof_query_destroy (sw->q);
+    if (sw->start_q) qof_query_destroy (sw->start_q);
 
     /* Destroy the user_data */
     if (sw->free_cb)
@@ -939,7 +939,7 @@
     /* Figure out if we this object-type has an "active" parameter, and
      * if not, then set the active-check button insensitive
      */
-    if (gncQueryObjectGetParameter (sw->search_for, QUERY_PARAM_ACTIVE) == NULL)
+    if (gncQueryObjectGetParameter (sw->search_for, QOF_PARAM_ACTIVE) == NULL)
         gtk_widget_set_sensitive (sw->active_only_check, FALSE);
 
     /* Deal with the cancel button */
@@ -1026,7 +1026,7 @@
 gnc_search_dialog_create (GNCIdTypeConst obj_type, const gchar *title,
                           GList *param_list,
                           GList *display_list,
-                          QueryNew *start_query, QueryNew *show_start_query,
+                          QofQuery *start_query, QofQuery *show_start_query,
                           GNCSearchCallbackButton *callbacks,
                           GNCSearchResultCB result_callback,
                           GNCSearchNewItemCB new_item_cb,
@@ -1061,7 +1061,7 @@
     /* Grab the get_guid function */
     sw->get_guid = qof_class_get_parameter (sw->search_for, QOF_PARAM_GUID);
     if (start_query)
-        sw->start_q = gncQueryCopy (start_query);
+        sw->start_q = qof_query_copy (start_query);
     sw->q = show_start_query;
 
     gnc_search_dialog_init_widgets (sw, title);
@@ -1140,7 +1140,7 @@
                                      type, SPLIT_TRANS, TRANS_SPLITLIST,
                                      SPLIT_ACCOUNT_GUID, NULL);
     list = gnc_search_param_prepend (list, "Split Account", GNC_ID_ACCOUNT,
-                                     type, SPLIT_ACCOUNT, QUERY_PARAM_GUID,
+                                     type, SPLIT_ACCOUNT, QOF_PARAM_GUID,
                                      NULL);
     list = gnc_search_param_prepend (list, "Split->Txn->Void?", NULL, type,
                                      SPLIT_TRANS, TRANS_VOID_STATUS, NULL);

Modified: gnucash/trunk/src/gnome-search/dialog-search.h
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/dialog-search.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -25,7 +25,7 @@
 #define _GNC_DIALOG_SEARCH_H
 
 #include "GNCId.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 typedef struct _GNCSearchWindow GNCSearchWindow;
 
@@ -42,7 +42,7 @@
  * and the callback may change the value.
  */
 typedef void (*GNCSearchCallback) (gpointer *obj_p, gpointer user_data);
-typedef void (*GNCSearchResultCB) (QueryNew *query, gpointer user_data,
+typedef void (*GNCSearchResultCB) (QofQuery *query, gpointer user_data,
                                    gpointer *result);
 
 /*
@@ -93,7 +93,7 @@
 gnc_search_dialog_create (GNCIdTypeConst obj_type, const gchar *title,
                           GList *param_list,
                           GList *display_list,
-                          QueryNew *start_query, QueryNew *show_start_query,
+                          QofQuery *start_query, QofQuery *show_start_query,
                           GNCSearchCallbackButton *callbacks,
                           GNCSearchResultCB result_callback,
                           GNCSearchNewItemCB new_item_cb,

Modified: gnucash/trunk/src/gnome-search/gnc-general-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/gnc-general-search.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/gnc-general-search.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -384,7 +384,7 @@
                  QofBook          *book)
 {
     GtkListStore *	list_store;
-    QueryNew *	q;
+    QofQuery *	q;
     GtkTreeIter iter;
     GList * list, * it;
     GtkEntryCompletion *completion;
@@ -427,7 +427,7 @@
 
     }
 
-    gncQueryDestroy(q);
+    qof_query_destroy(q);
 
     /* Add the GtkEntryCompletion widget */
     completion = gtk_entry_completion_new();

Modified: gnucash/trunk/src/gnome-search/search-account.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-account.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-account.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_ACCOUNT_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_ACCOUNT 	(gnc_search_account_get_type ())
 #define GNCSEARCH_ACCOUNT(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_ACCOUNT, GNCSearchAccount)

Modified: gnucash/trunk/src/gnome-search/search-boolean.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-boolean.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-boolean.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_BOOLEAN_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_BOOLEAN		(gnc_search_boolean_get_type ())
 #define GNCSEARCH_BOOLEAN(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_BOOLEAN, GNCSearchBoolean)

Modified: gnucash/trunk/src/gnome-search/search-core-type.c
===================================================================
--- gnucash/trunk/src/gnome-search/search-core-type.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-core-type.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "Account.h"		/* for ACCOUNT_MATCH_ALL_TYPE */
 #include "Transaction.h"	/* for RECONCILED_MATCH_TYPE */
 

Modified: gnucash/trunk/src/gnome-search/search-core-type.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-core-type.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-core-type.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_CORE_TYPE_H
 
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "search-param.h"
 
 #define GNC_TYPE_SEARCH_CORE_TYPE		(gnc_search_core_type_get_type ())

Modified: gnucash/trunk/src/gnome-search/search-date.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-date.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-date.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,8 +23,8 @@
 #define _GNCSEARCH_DATE_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
 #include "qof.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_DATE		(gnc_search_date_get_type ())
 #define GNCSEARCH_DATE(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_DATE, GNCSearchDate)

Modified: gnucash/trunk/src/gnome-search/search-double.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-double.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-double.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_DOUBLE_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_DOUBLE		(gnc_search_double_get_type ())
 #define GNCSEARCH_DOUBLE(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_DOUBLE, GNCSearchDouble)

Modified: gnucash/trunk/src/gnome-search/search-int64.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-int64.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-int64.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -23,7 +23,7 @@
 #define _GNCSEARCH_INT64_H
 
 #include "search-core-type.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_INT64		(gnc_search_int64_get_type ())
 #define GNCSEARCH_INT64(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_INT64, GNCSearchInt64)

Modified: gnucash/trunk/src/gnome-search/search-numeric.h
===================================================================
--- gnucash/trunk/src/gnome-search/search-numeric.h	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-search/search-numeric.h	2010-12-12 21:30:59 UTC (rev 19932)
@@ -24,7 +24,7 @@
 
 #include "search-core-type.h"
 #include "qof.h"
-#include "QueryNew.h"
+#include "qof.h"
 
 #define GNC_TYPE_SEARCH_NUMERIC		(gnc_search_numeric_get_type ())
 #define GNCSEARCH_NUMERIC(obj)		GTK_CHECK_CAST (obj, GNC_TYPE_SEARCH_NUMERIC, GNCSearchNumeric)

Modified: gnucash/trunk/src/gnome-utils/dialog-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-query-list.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-utils/dialog-query-list.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -27,7 +27,7 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#include "QueryNew.h"
+#include "qof.h"
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
@@ -70,7 +70,7 @@
 
     g_return_if_fail (dql);
 
-    for (node = gncQueryGetBooks(q); node; node = node->next)
+    for (node = qof_query_get_books(q); node; node = node->next)
     {
         QofBook *book = node->data;
         GncGUID *guid = xaccGUIDMalloc();

Modified: gnucash/trunk/src/gnome-utils/gnc-query-list.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-query-list.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/gnome-utils/gnc-query-list.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -31,7 +31,7 @@
 #include "gnc-query-list.h"
 #include "search-param.h"
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "QueryObject.h"
 
 /* Signal codes */
@@ -129,7 +129,7 @@
     g_return_if_fail(IS_GNC_QUERY_LIST(list));
 
     /* more configuration */
-    list->query = gncQueryCopy(query);
+    list->query = qof_query_copy(query);
     list->column_params = param_list;
 
     /* cache the function to get the guid of this query type */
@@ -170,8 +170,8 @@
     g_return_if_fail(query);
     g_return_if_fail (IS_GNC_QUERY_LIST(list));
 
-    gncQueryDestroy(list->query);
-    list->query = gncQueryCopy(query);
+    qof_query_destroy(list->query);
+    list->query = qof_query_copy(query);
     gnc_query_list_set_query_sort(list, TRUE);
 }
 
@@ -716,7 +716,7 @@
 
         p1 = gnc_search_param_get_param_path(param);
         p2 = g_slist_prepend(NULL, QUERY_DEFAULT_SORT);
-        gncQuerySetSortOrder (list->query, p1, p2, NULL);
+        qof_query_set_sort_order (list->query, p1, p2, NULL);
     }
 
     qof_query_set_sort_increasing (list->query,
@@ -794,7 +794,7 @@
     gnc_gui_component_clear_watches (priv->component_id);
 
     /* Reverse the list now because 'append()' takes too long */
-    entries = gncQueryRun(list->query);
+    entries = qof_query_run(list->query);
 
     for (item = entries; item; item = item->next)
     {

Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2010-12-12 21:30:40 UTC (rev 19931)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2010-12-12 21:30:59 UTC (rev 19932)
@@ -28,7 +28,7 @@
 #include "Account.h"
 #include "Query.h"
 #include "QueryCore.h"
-#include "QueryNew.h"
+#include "qof.h"
 #include "SX-book.h"
 #include "Transaction.h"
 #include "gnc-component-manager.h"
@@ -429,7 +429,7 @@
 
         tRoot = gnc_book_get_template_root( gnc_get_current_book() );
         al = gnc_account_get_descendants( tRoot );
-        xaccQueryAddAccountMatch( query, al, GUID_MATCH_NONE, QUERY_AND );
+        xaccQueryAddAccountMatch( query, al, GUID_MATCH_NONE, QOF_QUERY_AND );
         g_list_free (al);
         al = NULL;
         tRoot = NULL;
@@ -441,7 +441,7 @@
     xaccQueryAddDateMatchTT (query,
                              TRUE, start,
                              FALSE, 0,
-                             QUERY_AND);
+                             QOF_QUERY_AND);
 
     ld = gnc_ledger_display_internal (NULL, query, LD_GL, GENERAL_LEDGER,
                                       REG_STYLE_JOURNAL, FALSE, FALSE);
@@ -482,7 +482,7 @@
         root = gnc_book_get_template_root (book);
         acct = gnc_account_lookup_by_name(root, id);
         g_assert( acct );
-        xaccQueryAddSingleAccountMatch (q, acct, QUERY_AND);
+        xaccQueryAddSingleAccountMatch (q, acct, QOF_QUERY_AND);
     }
 
     ld = gnc_ledger_display_internal (NULL, q, LD_GL,
@@ -665,7 +665,7 @@
     accounts = g_list_prepend (accounts, leader);
 
     xaccQueryAddAccountMatch (ld->query, accounts,
-                              GUID_MATCH_ANY, QUERY_AND);
+                              GUID_MATCH_ANY, QOF_QUERY_AND);
 
     g_list_free (accounts);
 }



More information about the gnucash-changes mailing list