author | eilers <eilers> | 2002-10-07 17:34:24 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-07 17:34:24 (UTC) |
commit | 0981af024243b314b45ddaf3ebee08bc184f06e2 (patch) (unidiff) | |
tree | 578c3057b922911010bfbddc373476e3ae3b32f6 /libopie2/opiepim/core | |
parent | ab5b7ba61580bfd3aa20297e67bd9fa6b6c90d41 (diff) | |
download | opie-0981af024243b314b45ddaf3ebee08bc184f06e2.zip opie-0981af024243b314b45ddaf3ebee08bc184f06e2.tar.gz opie-0981af024243b314b45ddaf3ebee08bc184f06e2.tar.bz2 |
added OBackendFactory for advanced backend access
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index 8a8ff08..b5f358b 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp | |||
@@ -21,6 +21,9 @@ | |||
21 | * ===================================================================== | 21 | * ===================================================================== |
22 | * History: | 22 | * History: |
23 | * $Log$ | 23 | * $Log$ |
24 | * Revision 1.3 2002/10/07 17:34:24 eilers | ||
25 | * added OBackendFactory for advanced backend access | ||
26 | * | ||
24 | * Revision 1.2 2002/10/02 16:18:11 eilers | 27 | * Revision 1.2 2002/10/02 16:18:11 eilers |
25 | * debugged and seems to work almost perfectly .. | 28 | * debugged and seems to work almost perfectly .. |
26 | * | 29 | * |
@@ -34,6 +37,7 @@ | |||
34 | */ | 37 | */ |
35 | 38 | ||
36 | #include "ocontactaccess.h" | 39 | #include "ocontactaccess.h" |
40 | #include "obackendfactory.h" | ||
37 | 41 | ||
38 | #include <qasciidict.h> | 42 | #include <qasciidict.h> |
39 | #include <qdatetime.h> | 43 | #include <qdatetime.h> |
@@ -53,7 +57,7 @@ | |||
53 | #include "ocontactaccessbackend_xml.h" | 57 | #include "ocontactaccessbackend_xml.h" |
54 | 58 | ||
55 | 59 | ||
56 | OContactAccess::OContactAccess ( const QString appname, const QString filename, | 60 | OContactAccess::OContactAccess ( const QString appname, const QString , |
57 | OContactAccessBackend* end, bool autosync ): | 61 | OContactAccessBackend* end, bool autosync ): |
58 | OPimAccessTemplate<OContact>( end ), | 62 | OPimAccessTemplate<OContact>( end ), |
59 | m_changed ( false ) | 63 | m_changed ( false ) |
@@ -62,7 +66,9 @@ OContactAccess::OContactAccess ( const QString appname, const QString filename, | |||
62 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). | 66 | * will use the XML-Backend as default (until we have a cute SQL-Backend..). |
63 | */ | 67 | */ |
64 | if( end == 0 ) { | 68 | if( end == 0 ) { |
65 | end = new OContactAccessBackend_XML( appname, filename ); | 69 | // __asm__("int3"); |
70 | qWarning ("Using BackendFactory !"); | ||
71 | end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); | ||
66 | } | 72 | } |
67 | // Set backend locally and in template | 73 | // Set backend locally and in template |
68 | m_backEnd = end; | 74 | m_backEnd = end; |