summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/obackendfactory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h
index 4daf861..4bedbef 100644
--- a/libopie2/opiepim/backend/obackendfactory.h
+++ b/libopie2/opiepim/backend/obackendfactory.h
@@ -133,49 +133,49 @@ class OBackendFactory
133 133
134 /** 134 /**
135 * Returns the style of the default database which is used to contact PIM data. 135 * Returns the style of the default database which is used to contact PIM data.
136 * @param type the type of the backend 136 * @param type the type of the backend
137 * @see OPimGlobal 137 * @see OPimGlobal
138 */ 138 */
139 static OPimGlobal::DatabaseStyle defaultDB( OPimGlobal::PimType type ){ 139 static OPimGlobal::DatabaseStyle defaultDB( OPimGlobal::PimType type ){
140 QString group_name; 140 QString group_name;
141 switch ( type ){ 141 switch ( type ){
142 case OPimGlobal::TODOLIST: 142 case OPimGlobal::TODOLIST:
143 group_name = "todo"; 143 group_name = "todo";
144 break; 144 break;
145 case OPimGlobal::CONTACTLIST: 145 case OPimGlobal::CONTACTLIST:
146 group_name = "contact"; 146 group_name = "contact";
147 break; 147 break;
148 case OPimGlobal::DATEBOOK: 148 case OPimGlobal::DATEBOOK:
149 group_name = "datebook"; 149 group_name = "datebook";
150 break; 150 break;
151 default: 151 default:
152 group_name = "unknown"; 152 group_name = "unknown";
153 } 153 }
154 154
155 Config config( "pimaccess" ); 155 Config config( "pimaccess" );
156 config.setGroup ( group_name ); 156 config.setGroup ( group_name );
157 QString db_String = config.readEntry( "usebackend" ); 157 QString db_String = config.readEntry( "usebackend", "xml" );
158 158
159 QAsciiDict<int> dictDbTypes( OPimGlobal::_END_DatabaseStyle ); 159 QAsciiDict<int> dictDbTypes( OPimGlobal::_END_DatabaseStyle );
160 dictDbTypes.setAutoDelete( TRUE ); 160 dictDbTypes.setAutoDelete( TRUE );
161 161
162 dictDbTypes.insert( "xml", new int (OPimGlobal::XML) ); 162 dictDbTypes.insert( "xml", new int (OPimGlobal::XML) );
163 dictDbTypes.insert( "sql", new int (OPimGlobal::SQL) ); 163 dictDbTypes.insert( "sql", new int (OPimGlobal::SQL) );
164 dictDbTypes.insert( "vcard", new int (OPimGlobal::VCARD) ); 164 dictDbTypes.insert( "vcard", new int (OPimGlobal::VCARD) );
165 165
166 int* db_find = dictDbTypes[ db_String ]; 166 int* db_find = dictDbTypes[ db_String ];
167 167
168 if ( !db_find ) 168 if ( !db_find )
169 return OPimGlobal::UNKNOWN; 169 return OPimGlobal::UNKNOWN;
170 170
171 return (OPimGlobal::DatabaseStyle) *db_find; 171 return (OPimGlobal::DatabaseStyle) *db_find;
172 } 172 }
173 173
174 174
175 /** 175 /**
176 * Returns the default backend implementation for backendName. Which one is used, is defined 176 * Returns the default backend implementation for backendName. Which one is used, is defined
177 * by the configfile "pimaccess.conf". 177 * by the configfile "pimaccess.conf".
178 * @param backendName the type of the backend (use "todo", "contact" or "datebook" ) 178 * @param backendName the type of the backend (use "todo", "contact" or "datebook" )
179 * @param appName The name of your application. It will be passed on to the backend 179 * @param appName The name of your application. It will be passed on to the backend
180 */ 180 */
181 static T* defaultBackend( const QString backendName, const QString& appName ){ 181 static T* defaultBackend( const QString backendName, const QString& appName ){