summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm
authorzautrix <zautrix>2005-01-18 19:25:46 (UTC)
committer zautrix <zautrix>2005-01-18 19:25:46 (UTC)
commit541a04d084d7514a31c9ec88afe6c0ee7add7b85 (patch) (side-by-side diff)
tree19967716d30d6bcb7b30e71b11e6d192e228ad86 /kabc/plugins/sharpdtm
parent790533d303665e27f183b941df88b389afb92d0a (diff)
downloadkdepimpi-541a04d084d7514a31c9ec88afe6c0ee7add7b85.zip
kdepimpi-541a04d084d7514a31c9ec88afe6c0ee7add7b85.tar.gz
kdepimpi-541a04d084d7514a31c9ec88afe6c0ee7add7b85.tar.bz2
kapi trans
Diffstat (limited to 'kabc/plugins/sharpdtm') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index 8165b4c..95e16b6 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -72,25 +72,25 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
{
SlZDataBase* db = (SlZDataBase*)database;
// for syncing: we need setting of the two fields
addr.setExternalUID( QString::number( contact ) );
addr.setOriginalExternalUID( QString::number( contact ) );
addr.setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL );
// name
//qDebug("SharpDTMConverter::sharpToAddressee check if the fileAs transformation works!!");
addr.setFormattedName(db->readField(ZdbAdrs::FileAs));
- addr.setName(db->readField(ZdbAdrs::FullName));
+ //addr.setName(db->readField(ZdbAdrs::FullName));
addr.setFamilyName( db->readField(ZdbAdrs::LastName) );
addr.setGivenName( db->readField(ZdbAdrs::FirstName) );
addr.setAdditionalName( db->readField(ZdbAdrs::MiddleName) );
addr.setPrefix( db->readField(ZdbAdrs::Title) );
addr.setSuffix( db->readField(ZdbAdrs::Suffix) );
QString emailstr = db->readField(ZdbAdrs::Emails);
emailstr.replace( QRegExp(","), " " );
emailstr.replace( QRegExp(";"), " " );
emailstr.replace( QRegExp(":"), " " );
@@ -293,25 +293,25 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
QString formattedName = addr.formattedName();
if ( formattedName.isEmpty() ) {
if ( !addr.familyName().isEmpty() ) {
formattedName = addr.familyName();
if ( !addr.givenName().isEmpty() ) {
formattedName += ", ";
formattedName += addr.givenName();
}
} else
formattedName = addr.givenName();
}
database->writeField(ZdbAdrs::FileAs, formattedName);
- database->writeField(ZdbAdrs::FullName, addr.name());
+ database->writeField(ZdbAdrs::FullName, formattedName);
// email
//qDebug("SharpDTMConverter::addresseeToSharp check which seperator we need here for the emails!!");
//qDebug("SharpDTMConverter::addresseeToSharp its probably the same from sharpToAddressee");
QString emails = addr.emails().join(" ");
database->writeField(ZdbAdrs::Emails, emails );
database->writeField(ZdbAdrs::DefaultEmail, addr.preferredEmail() );
// home
const Address homeaddress = addr.address(Address::Home);
database->writeField(ZdbAdrs::HomeStreet, homeaddress.street());
database->writeField(ZdbAdrs::HomeCity, homeaddress.locality());