summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp56
1 files changed, 39 insertions, 17 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 66e94ef..6d92ac3 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -450,7 +450,7 @@ void ContactEditor::init() {
cmbChooserField3->insertStringList( *slChooserNames );
- cmbChooserField1->setCurrentItem( 1 );
- cmbChooserField2->setCurrentItem( 2 );
- cmbChooserField3->setCurrentItem( 3 );
+ cmbChooserField1->setCurrentItem( 0 );
+ cmbChooserField2->setCurrentItem( 1 );
+ cmbChooserField3->setCurrentItem( 2 );
connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
@@ -960,4 +960,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
cleanupFields();
+
ent = entry;
@@ -1015,4 +1016,9 @@ void ContactEditor::setEntry( const Contact &entry ) {
}
+ if (hasCountry) {
+ (*slHomeAddress)[6] = ent.homeCountry();
+ (*slBusinessAddress)[6] = ent.businessCountry();
+ }
+
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
@@ -1056,5 +1062,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
*itV = ent.businessPhone();
/*
@@ -1062,8 +1068,8 @@ void ContactEditor::setEntry( const Contact &entry ) {
*itV = ent.business2Phone();
*/
- if ( *it == "Business Fax" )
+ if ( *it == "Business Fax" || *it == "Work Fax" )
*itV = ent.businessFax();
- if ( *it == "Business Mobile" )
+ if ( *it == "Business Mobile" || *it == "work Mobile" )
*itV = ent.businessMobile();
/*
@@ -1098,5 +1104,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
*itV = ent.otherPhone();
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
*itV = ent.businessPager();
/*
@@ -1121,5 +1127,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
if ( *it == "Home Web Page" )
*itV = ent.homeWebpage();
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
*itV = ent.businessWebpage();
@@ -1134,4 +1140,10 @@ void ContactEditor::setEntry( const Contact &entry ) {
txtNote->setText( ent.notes() );
+ slotCmbChooser1Change( cmbChooserField1->currentItem() );
+ slotCmbChooser2Change( cmbChooserField2->currentItem() );
+ slotCmbChooser3Change( cmbChooserField3->currentItem() );
+
+ slotAddressTypeChange( cmbAddress->currentItem() );
+
}
@@ -1199,4 +1211,9 @@ void ContactEditor::saveEntry() {
ent.setBusinessZip( (*slBusinessAddress)[5] );
}
+
+ if (hasCountry) {
+ ent.setHomeCountry( (*slHomeAddress)[6] );
+ ent.setBusinessCountry( (*slBusinessAddress)[6] );
+ }
QStringList::ConstIterator it;
@@ -1241,5 +1258,5 @@ void ContactEditor::saveEntry() {
for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
ent.setBusinessPhone( *itV );
/*
@@ -1247,8 +1264,8 @@ void ContactEditor::saveEntry() {
ent.setBusiness2Phone( *itV );
*/
- if ( *it == "Business Fax" )
+ if ( *it == "Business Fax" || *it == "Work Fax" )
ent.setBusinessFax( *itV );
- if ( *it == "Business Mobile" )
+ if ( *it == "Business Mobile" || *it == "Work Mobile" )
ent.setBusinessMobile( *itV );
/*
@@ -1256,9 +1273,14 @@ void ContactEditor::saveEntry() {
ent.setCompanyPhone( *itV );
*/
- if ( *it == "Default Email" )
- ent.setDefaultEmail( *itV );
-
- if ( *it == "Emails" )
+ //if ( *it == "Default Email" )
+ //ent.setDefaultEmail( *itV );
+
+ if ( *it == "Emails" ) {
+ QString allemail;
+ QString defaultmail;
+ parseEmailFrom( *itV, defaultmail, allemail );
+ ent.setDefaultEmail( defaultmail );
ent.setEmails( *itV );
+ }
if ( *it == "Home Phone" )
@@ -1283,5 +1305,5 @@ void ContactEditor::saveEntry() {
ent.setOtherPhone( *itV );
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
ent.setBusinessPager( *itV );
/*
@@ -1306,5 +1328,5 @@ void ContactEditor::saveEntry() {
if ( *it == "Home Web Page" )
ent.setHomeWebpage( *itV );
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
ent.setBusinessWebpage( *itV );