From 21766cbcf4b4ca84da82a83f1b87d1366e75dd86 Mon Sep 17 00:00:00 2001 From: eilers Date: Tue, 08 Oct 2002 09:27:36 +0000 Subject: Fixed libopie.pro to include the new pim-API. The SQL-Stuff is currently deactivated. Otherwise everyone who wants to compile itself would need to install libsqlite, libopiesql... Therefore, the backend currently uses XML only.. --- (limited to 'libopie/pim') diff --git a/libopie/pim/obackendfactory.h b/libopie/pim/obackendfactory.h index 599fbf2..f11f029 100644 --- a/libopie/pim/obackendfactory.h +++ b/libopie/pim/obackendfactory.h @@ -16,6 +16,12 @@ * ===================================================================== * History: * $Log$ + * Revision 1.2 2002/10/08 09:27:36 eilers + * Fixed libopie.pro to include the new pim-API. + * The SQL-Stuff is currently deactivated. Otherwise everyone who wants to + * compile itself would need to install libsqlite, libopiesql... + * Therefore, the backend currently uses XML only.. + * * Revision 1.1 2002/10/07 17:35:01 eilers * added OBackendFactory for advanced backend access * @@ -31,8 +37,10 @@ #include "otodoaccessxml.h" #include "ocontactaccessbackend_xml.h" -#include "otodoaccesssql.h" +#ifdef __USE_SQL +#include "otodoaccesssql.h" +#endif template class OBackendFactory @@ -64,9 +72,14 @@ class OBackendFactory switch ( *dict.take( backendName ) ){ case TODO: +#ifdef __USE_SQL if ( backend == "sql" ) return (T*) new OTodoAccessBackendSQL(""); - +#else + if ( backend == "sql" ) + qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); +#endif + return (T*) new OTodoAccessXML( appName ); case CONTACT: if ( backend == "sql" ) diff --git a/libopie/pim/otodoaccess.cpp b/libopie/pim/otodoaccess.cpp index 4468812..80424d9 100644 --- a/libopie/pim/otodoaccess.cpp +++ b/libopie/pim/otodoaccess.cpp @@ -9,11 +9,12 @@ OTodoAccess::OTodoAccess( OTodoAccessBackend* end ) : QObject(), OPimAccessTemplate( end ), m_todoBackEnd( end ) { - if (end == 0l ) - m_todoBackEnd = new OTodoAccessBackendSQL( QString::null); +// if (end == 0l ) +// m_todoBackEnd = new OTodoAccessBackendSQL( QString::null); - // if (end == 0l ) - // m_todoBackEnd = OBackendFactory::Default ("todo", QString::null); + // Zecke: Du musst hier noch für das XML-Backend einen Appnamen übergeben ! + if (end == 0l ) + m_todoBackEnd = OBackendFactory::Default ("todo", QString::null); setBackEnd( m_todoBackEnd ); } -- cgit v0.9.0.2