summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie/resourceopie.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/opie/resourceopie.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 4b811e9..22237dc 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -202,48 +202,50 @@ bool ResourceOpie::load()
202 } 202 }
203 203
204 } 204 }
205 205
206 206
207 return true; 207 return true;
208} 208}
209 209
210bool ResourceOpie::save( Ticket *ticket ) 210bool ResourceOpie::save( Ticket *ticket )
211{ 211{
212 qDebug("ResourceOpie::save: %s", fileName().latin1()); 212 qDebug("ResourceOpie::save: %s", fileName().latin1());
213 213
214 214 mDirWatch.stopScan();
215 215
216 KABC::AddressBook::Iterator it; 216 KABC::AddressBook::Iterator it;
217 bool res; 217 bool res;
218 218
219 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { 219 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
220 OContact c; 220 OContact c;
221 KABC::Addressee addressee = (*it); 221 KABC::Addressee addressee = (*it);
222 222
223 res = mConverter->addresseeToOpie( *it, c ); 223 res = mConverter->addresseeToOpie( *it, c );
224 if (res == true) 224 if (res == true)
225 { 225 {
226 res = mAccess->add(c); 226 res = mAccess->add(c);
227 if (res == false) 227 if (res == false)
228 qDebug("Unable to append Contact %s", c.fullName().latin1()); 228 qDebug("Unable to append Contact %s", c.fullName().latin1());
229 } 229 }
230 else 230 else
231 { 231 {
232 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1()); 232 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1());
233 } 233 }
234 } 234 }
235 235
236 mAccess->save(); 236 mAccess->save();
237 237
238 mDirWatch.startScan();
239
238 delete ticket; 240 delete ticket;
239 unlock( fileName() ); 241 unlock( fileName() );
240 242
241 return true; 243 return true;
242 244
243} 245}
244 246
245bool ResourceOpie::lock( const QString &lockfileName ) 247bool ResourceOpie::lock( const QString &lockfileName )
246{ 248{
247 qDebug("ResourceOpie::lock: %s", fileName().latin1()); 249 qDebug("ResourceOpie::lock: %s", fileName().latin1());
248 250
249 kdDebug(5700) << "ResourceOpie::lock()" << endl; 251 kdDebug(5700) << "ResourceOpie::lock()" << endl;