author | eilers <eilers> | 2002-10-14 15:55:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-14 15:55:18 (UTC) |
commit | 16caa7343f4190a31bd80a9caa76118d7177ad3f (patch) (unidiff) | |
tree | 0f1e71fbe2be969c2620b88e645ad12174b887ef /libopie2/opiepim/backend/obackendfactory.h | |
parent | 17e4897122da8089fadb05496d09fb196919f674 (diff) | |
download | opie-16caa7343f4190a31bd80a9caa76118d7177ad3f.zip opie-16caa7343f4190a31bd80a9caa76118d7177ad3f.tar.gz opie-16caa7343f4190a31bd80a9caa76118d7177ad3f.tar.bz2 |
Redeactivate SQL.. ;)
Diffstat (limited to 'libopie2/opiepim/backend/obackendfactory.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/obackendfactory.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h index 89b8c58..b796fb8 100644 --- a/libopie2/opiepim/backend/obackendfactory.h +++ b/libopie2/opiepim/backend/obackendfactory.h | |||
@@ -13,12 +13,15 @@ | |||
13 | * ToDo: Use plugins | 13 | * ToDo: Use plugins |
14 | * ===================================================================== | 14 | * ===================================================================== |
15 | * Version: $Id$ | 15 | * Version: $Id$ |
16 | * ===================================================================== | 16 | * ===================================================================== |
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.4 2002/10/14 15:55:18 eilers | ||
20 | * Redeactivate SQL.. ;) | ||
21 | * | ||
19 | * Revision 1.3 2002/10/10 17:08:58 zecke | 22 | * Revision 1.3 2002/10/10 17:08:58 zecke |
20 | * The Cache is finally in place | 23 | * The Cache is finally in place |
21 | * I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;) | 24 | * I tested it with my todolist and it 'works' for 10.000 todos the hits are awesome ;) |
22 | * The read ahead functionality does not make sense for XMLs backends because most of the stuff is already in memory. While using readahead on SQL makes things a lot faster.... | 25 | * The read ahead functionality does not make sense for XMLs backends because most of the stuff is already in memory. While using readahead on SQL makes things a lot faster.... |
23 | * I still have to fully implement read ahead | 26 | * I still have to fully implement read ahead |
24 | * This change is bic but sc | 27 | * This change is bic but sc |
@@ -42,16 +45,16 @@ | |||
42 | #include <qasciidict.h> | 45 | #include <qasciidict.h> |
43 | #include <qpe/config.h> | 46 | #include <qpe/config.h> |
44 | 47 | ||
45 | #include "otodoaccessxml.h" | 48 | #include "otodoaccessxml.h" |
46 | #include "ocontactaccessbackend_xml.h" | 49 | #include "ocontactaccessbackend_xml.h" |
47 | 50 | ||
48 | /*#ifdef __USE_SQL | 51 | #ifdef __USE_SQL |
49 | #include "otodoaccesssql.h" | 52 | #include "otodoaccesssql.h" |
50 | #endif | 53 | #endif |
51 | */ | 54 | |
52 | 55 | ||
53 | template<class T> | 56 | template<class T> |
54 | class OBackendFactory | 57 | class OBackendFactory |
55 | { | 58 | { |
56 | public: | 59 | public: |
57 | OBackendFactory() {}; | 60 | OBackendFactory() {}; |
@@ -61,12 +64,13 @@ class OBackendFactory | |||
61 | CONTACT, | 64 | CONTACT, |
62 | DATE | 65 | DATE |
63 | }; | 66 | }; |
64 | 67 | ||
65 | static T* Default( const QString backendName, const QString& appName ){ | 68 | static T* Default( const QString backendName, const QString& appName ){ |
66 | 69 | ||
70 | // __asm__("int3"); | ||
67 | 71 | ||
68 | Config config( "pimaccess" ); | 72 | Config config( "pimaccess" ); |
69 | config.setGroup ( backendName ); | 73 | config.setGroup ( backendName ); |
70 | QString backend = config.readEntry( "usebackend" ); | 74 | QString backend = config.readEntry( "usebackend" ); |
71 | 75 | ||
72 | QAsciiDict<int> dict ( 3 ); | 76 | QAsciiDict<int> dict ( 3 ); |
@@ -77,19 +81,19 @@ class OBackendFactory | |||
77 | 81 | ||
78 | qWarning ("TODO is: %d", TODO); | 82 | qWarning ("TODO is: %d", TODO); |
79 | qWarning ("CONTACT is: %d", CONTACT); | 83 | qWarning ("CONTACT is: %d", CONTACT); |
80 | 84 | ||
81 | switch ( *dict.take( backendName ) ){ | 85 | switch ( *dict.take( backendName ) ){ |
82 | case TODO: | 86 | case TODO: |
83 | /*#ifdef __USE_SQL | 87 | #ifdef __USE_SQL |
84 | if ( backend == "sql" ) | 88 | if ( backend == "sql" ) |
85 | return (T*) new OTodoAccessBackendSQL(""); | 89 | return (T*) new OTodoAccessBackendSQL(""); |
86 | #else*/ | 90 | #else |
87 | if ( backend == "sql" ) | 91 | if ( backend == "sql" ) |
88 | qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); | 92 | qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); |
89 | //#endif | 93 | #endif |
90 | 94 | ||
91 | return (T*) new OTodoAccessXML( appName ); | 95 | return (T*) new OTodoAccessXML( appName ); |
92 | case CONTACT: | 96 | case CONTACT: |
93 | if ( backend == "sql" ) | 97 | if ( backend == "sql" ) |
94 | qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); | 98 | qWarning ("OBackendFactory:: sql Backend not implemented! Using XML instead!"); |
95 | 99 | ||