summaryrefslogtreecommitdiffabout
path: root/kabc/plugins
authorzautrix <zautrix>2004-09-21 11:17:18 (UTC)
committer zautrix <zautrix>2004-09-21 11:17:18 (UTC)
commitba89a5d20eb054054d9cfae3723a4d62b9f62efd (patch) (unidiff)
treeee1a42079e3204dbab6f45762f83cb4c1712579e /kabc/plugins
parent19f445f0b6e7d4591db46b89e877ed9f4332ecd4 (diff)
downloadkdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.zip
kdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.tar.gz
kdepimpi-ba89a5d20eb054054d9cfae3723a4d62b9f62efd.tar.bz2
DTM fix
Diffstat (limited to 'kabc/plugins') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp1
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index 437bda8..adc7256 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -289,25 +289,24 @@ bool ResourceSharpDTM::save( Ticket *ticket )
289 } 289 }
290 else 290 else
291 { 291 {
292 qDebug("Unable to convert Addressee: %s", addressee.formattedName().latin1()); 292 qDebug("Unable to convert Addressee: %s", addressee.formattedName().latin1());
293 mAccess->cancelEditCard(); 293 mAccess->cancelEditCard();
294 } 294 }
295 } 295 }
296 } 296 }
297 } 297 }
298 298
299 } 299 }
300 AddresseeMap::Iterator itam; 300 AddresseeMap::Iterator itam;
301 res;
302 for ( res=mAccess->first(); res == true; res=mAccess->next()) 301 for ( res=mAccess->first(); res == true; res=mAccess->next())
303 { 302 {
304 id = mAccess->cardId(); 303 id = mAccess->cardId();
305 int idint = id; 304 int idint = id;
306 itam = map.find( idint ); 305 itam = map.find( idint );
307 if ( itam != map.end() ) { 306 if ( itam != map.end() ) {
308 KABC::Addressee addressee; 307 KABC::Addressee addressee;
309 qDebug("found change %d %s ", idint, itam.data().latin1()); 308 qDebug("found change %d %s ", idint, itam.data().latin1());
310 res = mConverter->sharpToAddressee( id, mAccess, addressee ); 309 res = mConverter->sharpToAddressee( id, mAccess, addressee );
311 310
312 if ( !addressee.isEmpty() && res ) 311 if ( !addressee.isEmpty() && res )
313 { 312 {
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index fccf625..d36df20 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -303,24 +303,25 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
303 // email 303 // email
304 //qDebug("SharpDTMConverter::addresseeToSharp check which seperator we need here for the emails!!"); 304 //qDebug("SharpDTMConverter::addresseeToSharp check which seperator we need here for the emails!!");
305 //qDebug("SharpDTMConverter::addresseeToSharp its probably the same from sharpToAddressee"); 305 //qDebug("SharpDTMConverter::addresseeToSharp its probably the same from sharpToAddressee");
306 QString emails = addr.emails().join(" "); 306 QString emails = addr.emails().join(" ");
307 database->writeField(ZdbAdrs::Emails, emails ); 307 database->writeField(ZdbAdrs::Emails, emails );
308 308
309 database->writeField(ZdbAdrs::DefaultEmail, addr.preferredEmail() ); 309 database->writeField(ZdbAdrs::DefaultEmail, addr.preferredEmail() );
310 310
311 311
312 // home 312 // home
313 const Address homeaddress = addr.address(Address::Home); 313 const Address homeaddress = addr.address(Address::Home);
314 if (!homeaddress.isEmpty()) { 314 if (!homeaddress.isEmpty()) {
315 qDebug("write home address ");
315 database->writeField(ZdbAdrs::HomeStreet, homeaddress.street()); 316 database->writeField(ZdbAdrs::HomeStreet, homeaddress.street());
316 database->writeField(ZdbAdrs::HomeCity, homeaddress.locality()); 317 database->writeField(ZdbAdrs::HomeCity, homeaddress.locality());
317 database->writeField(ZdbAdrs::HomeState, homeaddress.region()); 318 database->writeField(ZdbAdrs::HomeState, homeaddress.region());
318 database->writeField(ZdbAdrs::HomeZip, homeaddress.postalCode()); 319 database->writeField(ZdbAdrs::HomeZip, homeaddress.postalCode());
319 database->writeField(ZdbAdrs::HomeCountry, homeaddress.country()); 320 database->writeField(ZdbAdrs::HomeCountry, homeaddress.country());
320 } 321 }
321 322
322 PhoneNumber homephone = addr.phoneNumber( PhoneNumber::Home ); 323 PhoneNumber homephone = addr.phoneNumber( PhoneNumber::Home );
323 if (!homephone.number().isEmpty()) 324 if (!homephone.number().isEmpty())
324 database->writeField(ZdbAdrs::HomePhone, homephone.number()); 325 database->writeField(ZdbAdrs::HomePhone, homephone.number());
325 326
326 PhoneNumber homefax = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ); 327 PhoneNumber homefax = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax );
@@ -330,24 +331,25 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
330 PhoneNumber homemobile = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Cell ); 331 PhoneNumber homemobile = addr.phoneNumber( PhoneNumber::Home | PhoneNumber::Cell );
331 if (!homemobile.number().isEmpty()) { 332 if (!homemobile.number().isEmpty()) {
332 database->writeField(ZdbAdrs::HomeMobile, homemobile.number()); 333 database->writeField(ZdbAdrs::HomeMobile, homemobile.number());
333 cellHome = true; 334 cellHome = true;
334 } 335 }
335 336
336 database->writeField(ZdbAdrs::HomeWebPage, addr.url().url()); 337 database->writeField(ZdbAdrs::HomeWebPage, addr.url().url());
337 338
338 339
339 // business 340 // business
340 const Address businessaddress = addr.address(Address::Work); 341 const Address businessaddress = addr.address(Address::Work);
341 if (!businessaddress.isEmpty()) { 342 if (!businessaddress.isEmpty()) {
343 qDebug("write business address ");
342 database->writeField(ZdbAdrs::BusinessStreet, businessaddress.street()); 344 database->writeField(ZdbAdrs::BusinessStreet, businessaddress.street());
343 database->writeField(ZdbAdrs::BusinessCity, businessaddress.locality()); 345 database->writeField(ZdbAdrs::BusinessCity, businessaddress.locality());
344 database->writeField(ZdbAdrs::BusinessState, businessaddress.region()); 346 database->writeField(ZdbAdrs::BusinessState, businessaddress.region());
345 database->writeField(ZdbAdrs::BusinessZip, businessaddress.postalCode()); 347 database->writeField(ZdbAdrs::BusinessZip, businessaddress.postalCode());
346 database->writeField(ZdbAdrs::BusinessCountry, businessaddress.country()); 348 database->writeField(ZdbAdrs::BusinessCountry, businessaddress.country());
347 } 349 }
348 350
349 PhoneNumber businessphone = addr.phoneNumber( PhoneNumber::Work ); 351 PhoneNumber businessphone = addr.phoneNumber( PhoneNumber::Work );
350 if (!businessphone.number().isEmpty()) 352 if (!businessphone.number().isEmpty())
351 database->writeField(ZdbAdrs::BusinessPhone, businessphone.number()); 353 database->writeField(ZdbAdrs::BusinessPhone, businessphone.number());
352 354
353 PhoneNumber businessfax = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ); 355 PhoneNumber businessfax = addr.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax );