From 34e86ddf4f9b1045a5b730beab2d8d72e2dd4d56 Mon Sep 17 00:00:00 2001 From: eilers Date: Mon, 22 Sep 2003 14:31:15 +0000 Subject: Added first experimental incarnation of sql-backend for addressbook. Some modifications to be able to compile the todo sql-backend. A lot of changes fill follow... --- (limited to 'libopie/pim/obackendfactory.h') diff --git a/libopie/pim/obackendfactory.h b/libopie/pim/obackendfactory.h index f3c339d..3567687 100644 --- a/libopie/pim/obackendfactory.h +++ b/libopie/pim/obackendfactory.h @@ -16,6 +16,11 @@ * ===================================================================== * History: * $Log$ + * Revision 1.8 2003/09/22 14:31:16 eilers + * Added first experimental incarnation of sql-backend for addressbook. + * Some modifications to be able to compile the todo sql-backend. + * A lot of changes fill follow... + * * Revision 1.7 2003/08/01 12:30:16 eilers * Merging changes from BRANCH_1_0 to HEAD * @@ -74,6 +79,7 @@ #ifdef __USE_SQL #include "otodoaccesssql.h" +#include "ocontactaccessbackend_sql.h" #endif class OBackendPrivate; @@ -118,6 +124,8 @@ class OBackendFactory config.setGroup ( backendName ); QString backend = config.readEntry( "usebackend" ); + qWarning("Selected backend for %s is: %s", backendName.latin1(), backend.latin1() ); + QAsciiDict dict ( 3 ); dict.setAutoDelete ( TRUE ); @@ -125,9 +133,6 @@ class OBackendFactory dict.insert( "contact", new int (CONTACT) ); dict.insert( "datebook", new int(DATE) ); - qWarning ("TODO is: %d", TODO); - qWarning ("CONTACT is: %d", CONTACT); - int *find = dict[ backendName ]; if (!find ) return 0; @@ -143,8 +148,13 @@ class OBackendFactory return (T*) new OTodoAccessXML( appName ); case CONTACT: +#ifdef __USE_SQL + if ( backend == "sql" ) + return (T*) new OContactAccessBackend_SQL(""); +#else if ( backend == "sql" ) qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); +#endif return (T*) new OContactAccessBackend_XML( appName ); case DATE: -- cgit v0.9.0.2