summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/qtopia/resourceqtopia.cpp
Unidiff
Diffstat (limited to 'kabc/plugins/qtopia/resourceqtopia.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 93a4d33..48a9f22 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -182,47 +182,50 @@ bool ResourceQtopia::load()
182 addressee.setResource( this ); 182 addressee.setResource( this );
183 addressBook()->insertAddressee( addressee ); 183 addressBook()->insertAddressee( addressee );
184 } 184 }
185 } 185 }
186 186
187 return true; 187 return true;
188} 188}
189 189
190bool ResourceQtopia::save( Ticket *ticket ) 190bool ResourceQtopia::save( Ticket *ticket )
191{ 191{
192 qDebug("ResourceQtopia::save: %s", fileName().latin1()); 192 qDebug("ResourceQtopia::save: %s", fileName().latin1());
193 193
194 mDirWatch.stopScan();
194 195
195 KABC::AddressBook::Iterator it; 196 KABC::AddressBook::Iterator it;
196 bool res; 197 bool res;
197 198
198 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { 199 for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
199 PimContact c; 200 PimContact c;
200 KABC::Addressee addressee = (*it); 201 KABC::Addressee addressee = (*it);
201 202
202 res = mConverter->addresseeToQtopia( *it, c ); 203 res = mConverter->addresseeToQtopia( *it, c );
203 if (res == true) 204 if (res == true)
204 { 205 {
205 mAccess->addContact(c); 206 mAccess->addContact(c);
206// if (res == false) 207// if (res == false)
207// qDebug("Unable to append Contact %s", c.fullName().latin1()); 208// qDebug("Unable to append Contact %s", c.fullName().latin1());
208 } 209 }
209 else 210 else
210 { 211 {
211 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1()); 212 qDebug("Unable to convert Addressee %s", addressee.formattedName().latin1());
212 } 213 }
213 } 214 }
214 215
215// mAccess->addressBookUpdated(); 216// mAccess->addressBookUpdated();
216 217
218 mDirWatch.startScan();
219
217 delete ticket; 220 delete ticket;
218 unlock( fileName() ); 221 unlock( fileName() );
219 222
220 return true; 223 return true;
221} 224}
222 225
223bool ResourceQtopia::lock( const QString &lockfileName ) 226bool ResourceQtopia::lock( const QString &lockfileName )
224{ 227{
225 qDebug("ResourceQtopia::lock: %s", fileName().latin1()); 228 qDebug("ResourceQtopia::lock: %s", fileName().latin1());
226 229
227 kdDebug(5700) << "ResourceQtopia::lock()" << endl; 230 kdDebug(5700) << "ResourceQtopia::lock()" << endl;
228 231