summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -451,5 +451,5 @@ void ContactEditor::init() {
- cmbChooserField1->setCurrentItem( 1 );
- cmbChooserField2->setCurrentItem( 2 );
- cmbChooserField3->setCurrentItem( 3 );
+ cmbChooserField1->setCurrentItem( 0 );
+ cmbChooserField2->setCurrentItem( 1 );
+ cmbChooserField3->setCurrentItem( 2 );
@@ -961,2 +961,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
+
ent = entry;
@@ -1016,2 +1017,7 @@ void ContactEditor::setEntry( const Contact &entry ) {
+ if (hasCountry) {
+ (*slHomeAddress)[6] = ent.homeCountry();
+ (*slBusinessAddress)[6] = ent.businessCountry();
+ }
+
QStringList::ConstIterator it;
@@ -1057,3 +1063,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
*itV = ent.businessPhone();
@@ -1063,6 +1069,6 @@ void ContactEditor::setEntry( const Contact &entry ) {
*/
- 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();
@@ -1099,3 +1105,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
*itV = ent.businessPager();
@@ -1122,3 +1128,3 @@ void ContactEditor::setEntry( const Contact &entry ) {
*itV = ent.homeWebpage();
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
*itV = ent.businessWebpage();
@@ -1135,2 +1141,8 @@ void ContactEditor::setEntry( const Contact &entry ) {
+ slotCmbChooser1Change( cmbChooserField1->currentItem() );
+ slotCmbChooser2Change( cmbChooserField2->currentItem() );
+ slotCmbChooser3Change( cmbChooserField3->currentItem() );
+
+ slotAddressTypeChange( cmbAddress->currentItem() );
+
}
@@ -1201,2 +1213,7 @@ void ContactEditor::saveEntry() {
+ if (hasCountry) {
+ ent.setHomeCountry( (*slHomeAddress)[6] );
+ ent.setBusinessCountry( (*slBusinessAddress)[6] );
+ }
+
QStringList::ConstIterator it;
@@ -1242,3 +1259,3 @@ void ContactEditor::saveEntry() {
- if ( *it == "Business Phone" )
+ if ( *it == "Business Phone" || *it == "Work Phone" )
ent.setBusinessPhone( *itV );
@@ -1248,6 +1265,6 @@ void ContactEditor::saveEntry() {
*/
- 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 );
@@ -1257,7 +1274,12 @@ void ContactEditor::saveEntry() {
*/
- 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 );
+ }
@@ -1284,3 +1306,3 @@ void ContactEditor::saveEntry() {
*/
- if ( *it == "Business Pager" )
+ if ( *it == "Business Pager" || *it == "Work Pager" )
ent.setBusinessPager( *itV );
@@ -1307,3 +1329,3 @@ void ContactEditor::saveEntry() {
ent.setHomeWebpage( *itV );
- if ( *it == "Business Web Page" )
+ if ( *it == "Business Web Page" || *it == "Work Web Page" )
ent.setBusinessWebpage( *itV );