summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2005-10-28 03:41:01 (UTC)
committer zautrix <zautrix>2005-10-28 03:41:01 (UTC)
commitd934f3fe2a62f6a696992335124c4434cd77d990 (patch) (side-by-side diff)
tree88d33c54e3f8d08b09cf81f4cdbaeb7eb6a4bb9b /kabc
parentf83a59cf4f9d0cff4111b6f5c88e88e6dc96e79e (diff)
downloadkdepimpi-d934f3fe2a62f6a696992335124c4434cd77d990.zip
kdepimpi-d934f3fe2a62f6a696992335124c4434cd77d990.tar.gz
kdepimpi-d934f3fe2a62f6a696992335124c4434cd77d990.tar.bz2
and some bugs fixed
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp4
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.cpp8
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmconverter.cpp10
3 files changed, 11 insertions, 11 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 661bdf6..19c78ee 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -1054,43 +1054,43 @@ QString Addressee::businessPhoneLabel()
QString Addressee::mobilePhoneLabel()
{
return i18n("Mobile Phone");
}
QString Addressee::mobileWorkPhoneLabel()
{
return i18n("Mobile2 (work)");
}
QString Addressee::mobileHomePhoneLabel()
{
- return i18n("Mobile");
+ return i18n("Mobile (Home)");
}
QString Addressee::homeFaxLabel()
{
return i18n("Fax (Home)");
}
QString Addressee::businessFaxLabel()
{
return i18n("Fax (Work)");
}
QString Addressee::carPhoneLabel()
{
- return i18n("Mobile2 (work)");
+ return i18n("Mobile2 (car)");
}
QString Addressee::isdnLabel()
{
return i18n("ISDN");
}
QString Addressee::pagerLabel()
{
return i18n("Pager");
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp
index 39d366b..9693a68 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.cpp
+++ b/kabc/plugins/qtopia/qtopiaconverter.cpp
@@ -192,54 +192,54 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr )
QDate date = dateFromString( el.attribute( "Birthday" ) );
if ( date.isValid() )
adr.setBirthday( date );
adr.setRole( el.attribute( "JobTitle" ) );
if ( !el.attribute( "FileAs" ).isEmpty() )
adr.setFormattedName( el.attribute( "FileAs" ) );
adr.setOrganization( el.attribute( "Company" ) );
KABC::PhoneNumber businessPhoneNum( el.attribute( "BusinessPhone" ),
- KABC::PhoneNumber::Work );
+ KABC::PhoneNumber::Work | KABC::PhoneNumber::Pref );
KABC::PhoneNumber businessFaxNum( el.attribute( "BusinessFax" ),
KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax );
KABC::PhoneNumber businessMobile( el.attribute( "BusinessMobile" ),
- KABC::PhoneNumber::Work | KABC::PhoneNumber::Cell );
+ KABC::PhoneNumber::Car );
KABC::PhoneNumber businessPager( el.attribute( "BusinessPager" ),
- KABC::PhoneNumber::Work | KABC::PhoneNumber::Pager );
+ KABC::PhoneNumber::Pager );
if ( !businessPhoneNum.number().isEmpty() )
adr.insertPhoneNumber( businessPhoneNum );
if ( !businessFaxNum.number().isEmpty() )
adr.insertPhoneNumber( businessFaxNum );
if ( !businessMobile.number().isEmpty() )
adr.insertPhoneNumber( businessMobile );
if ( !businessPager.number().isEmpty() )
adr.insertPhoneNumber( businessPager );
// Handle multiple mail addresses
QString DefaultEmail = el.attribute( "DefaultEmail" );
if ( !DefaultEmail.isEmpty() )
adr.insertEmail( DefaultEmail, true ); // preferred
QStringList Emails = QStringList::split(" ",el.attribute("Emails"));
int i;
for (i = 0;i < Emails.count();++i) {
if ( Emails[i] != DefaultEmail )
adr.insertEmail( Emails[i], false );
}
KABC::PhoneNumber homePhoneNum( el.attribute( "HomePhone" ),
- KABC::PhoneNumber::Home );
+ KABC::PhoneNumber::Home | KABC::PhoneNumber::Pref);
KABC::PhoneNumber homeFax( el.attribute( "HomeFax" ),
KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax );
KABC::PhoneNumber homeMobile( el.attribute( "HomeMobile" ),
KABC::PhoneNumber::Cell );
if ( !homePhoneNum.number().isEmpty() )
adr.insertPhoneNumber( homePhoneNum );
if ( !homeFax.number().isEmpty() )
adr.insertPhoneNumber( homeFax );
if ( !homeMobile.number().isEmpty() )
adr.insertPhoneNumber( homeMobile );
diff --git a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
index 4adcae4..3d429fa 100644
--- a/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
+++ b/kabc/plugins/sharpdtm/sharpdtmconverter.cpp
@@ -123,41 +123,41 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
homeaddress.setStreet( db->readField(ZdbAdrs::HomeStreet).replace( QRegExp("\\r"), ""));
homeaddress.setLocality( db->readField(ZdbAdrs::HomeCity) );
homeaddress.setRegion( db->readField(ZdbAdrs::HomeState) );
homeaddress.setPostalCode( db->readField(ZdbAdrs::HomeZip) );
homeaddress.setCountry( db->readField(ZdbAdrs::HomeCountry) );
addr.insertAddress( homeaddress );
}
if (!db->readField(ZdbAdrs::HomePhone).isEmpty())
{
PhoneNumber homephone;
- homephone.setType( PhoneNumber::Home );
+ homephone.setType( PhoneNumber::Home | PhoneNumber::Pref );
homephone.setNumber( db->readField(ZdbAdrs::HomePhone) );
addr.insertPhoneNumber( homephone );
}
if (!db->readField(ZdbAdrs::HomeFax).isEmpty())
{
PhoneNumber homefax;
homefax.setType( PhoneNumber::Home | PhoneNumber::Fax );
homefax.setNumber( db->readField(ZdbAdrs::HomeFax) );
addr.insertPhoneNumber( homefax );
}
if (!db->readField(ZdbAdrs::HomeMobile).isEmpty())
{
PhoneNumber homemobile;
- homemobile.setType( PhoneNumber::Home | PhoneNumber::Cell );
+ homemobile.setType( PhoneNumber::Cell );
homemobile.setNumber( db->readField(ZdbAdrs::HomeMobile) );
addr.insertPhoneNumber( homemobile );
}
addr.setUrl( db->readField(ZdbAdrs::HomeWebPage) );
// business
if ((!db->readField(ZdbAdrs::BusinessStreet).isEmpty()) ||
(!db->readField(ZdbAdrs::BusinessCity).isEmpty()) ||
(!db->readField(ZdbAdrs::BusinessState).isEmpty()) ||
(!db->readField(ZdbAdrs::BusinessZip).isEmpty()) ||
@@ -171,49 +171,49 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
businessaddress.setLocality( db->readField(ZdbAdrs::BusinessCity) );
businessaddress.setRegion( db->readField(ZdbAdrs::BusinessState) );
businessaddress.setPostalCode( db->readField(ZdbAdrs::BusinessZip) );
businessaddress.setCountry( db->readField(ZdbAdrs::BusinessCountry) );
addr.insertAddress( businessaddress );
}
if (!db->readField(ZdbAdrs::BusinessPhone).isEmpty())
{
PhoneNumber businessphone;
- businessphone.setType( PhoneNumber::Work );
+ businessphone.setType( PhoneNumber::Work | PhoneNumber::Pref );
businessphone.setNumber( db->readField(ZdbAdrs::BusinessPhone) );
addr.insertPhoneNumber( businessphone );
}
if (!db->readField(ZdbAdrs::BusinessFax).isEmpty())
{
PhoneNumber businessfax;
businessfax.setType( PhoneNumber::Work | PhoneNumber::Fax );
businessfax.setNumber( db->readField(ZdbAdrs::BusinessFax) );
addr.insertPhoneNumber( businessfax );
}
if (!db->readField(ZdbAdrs::BusinessMobile).isEmpty())
{
PhoneNumber businessmobile;
- businessmobile.setType( PhoneNumber::Work | PhoneNumber::Cell );
+ businessmobile.setType( PhoneNumber::Car );
businessmobile.setNumber( db->readField(ZdbAdrs::BusinessMobile) );
addr.insertPhoneNumber( businessmobile );
}
if (!db->readField(ZdbAdrs::BusinessPager).isEmpty())
{
PhoneNumber businesspager;
- businesspager.setType( PhoneNumber::Work | PhoneNumber::Pager );
+ businesspager.setType( PhoneNumber::Pager );
businesspager.setNumber( db->readField(ZdbAdrs::BusinessPager) );
addr.insertPhoneNumber( businesspager );
}
addr.setRole( db->readField(ZdbAdrs::JobTitle) );
addr.setOrganization( db->readField(ZdbAdrs::Company) );
addr.insertCustom( "KADDRESSBOOK", "X-Profession", db->readField(ZdbAdrs::Profession) );
addr.insertCustom( "KADDRESSBOOK", "X-AssistantsName", db->readField(ZdbAdrs::Assistant) );
addr.insertCustom( "KADDRESSBOOK", "X-Department", db->readField(ZdbAdrs::Department) );
addr.insertCustom( "KADDRESSBOOK", "X-ManagersName", db->readField(ZdbAdrs::Manager) );
addr.insertCustom( "KADDRESSBOOK", "X-Office", db->readField(ZdbAdrs::Office) );