summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
authorzautrix <zautrix>2004-09-21 10:08:57 (UTC)
committer zautrix <zautrix>2004-09-21 10:08:57 (UTC)
commit19f445f0b6e7d4591db46b89e877ed9f4332ecd4 (patch) (unidiff)
treefd21a5dc32332060197d792552ef1eb469e92175 /kabc/plugins/sharpdtm/sharpdtmconverter.cpp
parent1cf4cc6e7bf25ee309852c7c97155de86917289f (diff)
downloadkdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.zip
kdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.tar.gz
kdepimpi-19f445f0b6e7d4591db46b89e877ed9f4332ecd4.tar.bz2
more sync fixes
Diffstat (limited to 'kabc/plugins/sharpdtm/sharpdtmconverter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index f3bf2c5..fccf625 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -286,8 +286,19 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
286 database->writeField(ZdbAdrs::Suffix, addr.suffix()); 286 database->writeField(ZdbAdrs::Suffix, addr.suffix());
287 287
288 //qDebug("SharpDTMConverter::addresseeToSharp check if the fileAs transformation works!!\n%s",addr.formattedName().latin1() ); 288 //qDebug("SharpDTMConverter::addresseeToSharp check if the fileAs transformation works!!\n%s",addr.formattedName().latin1() );
289 database->writeField(ZdbAdrs::FileAs, addr.formattedName()); 289 QString formattedName = addr.formattedName();
290 database->writeField(ZdbAdrs::FullName, addr.formattedName()); 290 if ( formattedName.isEmpty() ) {
291 if ( !addr.familyName().isEmpty() ) {
292 formattedName = addr.familyName();
293 if ( !addr.givenName().isEmpty() ) {
294 formattedName += ", ";
295 formattedName += addr.givenName();
296 }
297 } else
298 formattedName = addr.givenName();
299 }
300 database->writeField(ZdbAdrs::FileAs, formattedName);
301 database->writeField(ZdbAdrs::FullName, formattedName);
291 302
292 // email 303 // email
293 //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!!");
@@ -349,7 +360,7 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
349 database->writeField(ZdbAdrs::BusinessMobile, businessmobile.number()); 360 database->writeField(ZdbAdrs::BusinessMobile, businessmobile.number());
350 } 361 }
351 PhoneNumber mobile = addr.phoneNumber( PhoneNumber::Cell ); 362 PhoneNumber mobile = addr.phoneNumber( PhoneNumber::Cell );
352 if (!businessmobile.number().isEmpty()) { 363 if (! mobile.number().isEmpty()) {
353 if ( ! cellHome ) 364 if ( ! cellHome )
354 database->writeField(ZdbAdrs::HomeMobile, mobile.number()); 365 database->writeField(ZdbAdrs::HomeMobile, mobile.number());
355 else if (! cellWork ) 366 else if (! cellWork )