summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index a4f8d8a..3b2a6b7 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -198,49 +198,50 @@ bool ResourceOpie::load()
198 mConverter = new OpieConverter(); 198 mConverter = new OpieConverter();
199 199
200 200
201 OContactAccess::List::Iterator it; 201 OContactAccess::List::Iterator it;
202 OContactAccess::List allList = access->allRecords(); 202 OContactAccess::List allList = access->allRecords();
203 bool res = false; 203 bool res = false;
204 for ( it = allList.begin(); it != allList.end(); ++it ) 204 for ( it = allList.begin(); it != allList.end(); ++it )
205 { 205 {
206 OContact c = (*it); 206 OContact c = (*it);
207 207
208 KABC::Addressee addressee; 208 KABC::Addressee addressee;
209 209
210 res = mConverter->opieToAddressee( c, addressee ); 210 res = mConverter->opieToAddressee( c, addressee );
211 211
212 if ( !addressee.isEmpty() && res ) 212 if ( !addressee.isEmpty() && res )
213 { 213 {
214 addressee.setResource( this ); 214 addressee.setResource( this );
215 addressBook()->insertAddressee( addressee ); 215 addressBook()->insertAddressee( addressee );
216 } 216 }
217 217
218// qDebug("found %s", c.fullName().latin1()); 218// qDebug("found %s", c.fullName().latin1());
219 } 219 }
220 220
221 delete access; 221 delete access;
222 delete backend; 222 // it seems so, that deletion of access deletes backend as well
223 //delete backend;
223 224
224 return true; 225 return true;
225} 226}
226 227
227bool ResourceOpie::save( Ticket *ticket ) 228bool ResourceOpie::save( Ticket *ticket )
228{ 229{
229 qDebug("ResourceOpie::save() has to be fixed - %s", mFileName.latin1()); 230 qDebug("ResourceOpie::save() has to be fixed - %s", mFileName.latin1());
230/*US 231/*US
231 232
232 qDebug("ResourceOpie::save %s", mFileName.latin1()); 233 qDebug("ResourceOpie::save %s", mFileName.latin1());
233 kdDebug(5700) << "ResourceOpie::save()" << endl; 234 kdDebug(5700) << "ResourceOpie::save()" << endl;
234 235
235 // create backup file 236 // create backup file
236 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() ); 237 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
237*/ 238*/
238/*US we use a simpler method to create a backupfile 239/*US we use a simpler method to create a backupfile
239 240
240 (void) KSaveFile::backupFile( mFileName, QString::null 241 (void) KSaveFile::backupFile( mFileName, QString::null
241 ,extension ); 242 ,extension );
242 243
243 KSaveFile saveFile( mFileName ); 244 KSaveFile saveFile( mFileName );
244 bool ok = false; 245 bool ok = false;
245 if ( saveFile.status() == 0 && saveFile.file() ) 246 if ( saveFile.status() == 0 && saveFile.file() )
246 { 247 {