-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 88 |
2 files changed, 53 insertions, 38 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 472b13e..2eb9ddf 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -1,82 +1,82 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qt Palmtop Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** OContact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_FD #include "contacteditor.h" #include "ablabel.h" #include "abtable.h" #include "addresssettings.h" #include "addressbook.h" #include <opie/ofileselector.h> #include <opie/ofiledialog.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> -#include <qpe/contact.h> +#include <opie/ocontact.h> #ifndef MAKE_FOR_SHARP_ROM #include <qpe/finddialog.h> #endif #include <qpe/global.h> #include <qpe/resource.h> #include <qpe/ir.h> #include <qpe/qpemessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <qaction.h> #include <qdialog.h> #include <qdir.h> #include <qfile.h> #include <qimage.h> #include <qlayout.h> #include <qpe/qpemenubar.h> #include <qmessagebox.h> #include <qpixmap.h> #include <qpopupmenu.h> #include <qpe/qpetoolbar.h> #include <qstringlist.h> #include <qtoolbutton.h> #include <qwhatsthis.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <qdatetime.h> #include "picker.h" static QString addressbookOldXMLFilename() { QString filename = QPEApplication::documentDir() + "addressbook.xml"; return filename; } static QString addressbookXMLFilename() { QString filename = Global::applicationFileName("addressbook", "addressbook.xml"); return filename; } @@ -812,96 +812,97 @@ void AddressbookWindow::initFields() // Call the contact functions that correspond to these old functions... QStringList xmlFields = OContact::fields(); QStringList visibleFields = OContact::untrfields(); // QStringList trFields = OContact::trfields(); xmlFields.remove( "Title" ); visibleFields.remove( "Name Title" ); visibleFields.remove( "Notes" ); int i, version; Config cfg( "AddressBook" ); QString zn; // ### Write a function to keep this from happening again... QStringList::ConstIterator it; for ( i = 0, it = xmlFields.begin(); it != xmlFields.end(); ++it, i++ ) { allFields.append( i + 3 ); } cfg.setGroup( "Version" ); version = cfg.readNumEntry( "version" ); i = 0; startFontSize = 1; if ( version >= ADDRESSVERSION ) { cfg.setGroup( "ImportantCategory" ); zn = cfg.readEntry( "Category" + QString::number(i), QString::null ); while ( !zn.isNull() ) { if ( zn.contains( "Work" ) || zn.contains( "Mb" ) ) { slOrderedFields.clear(); break; } slOrderedFields.append( zn ); zn = cfg.readEntry( "Category" + QString::number(++i), QString::null ); } cfg.setGroup( "Font" ); startFontSize = cfg.readNumEntry( "fontSize", 1 ); } else { QString str; str = getenv("HOME"); str += "/Settings/AddressBook.conf"; QFile::remove( str ); } + if ( slOrderedFields.count() > 0 ) { for( QStringList::ConstIterator it = slOrderedFields.begin(); it != slOrderedFields.end(); ++it ) { QValueList<int>::ConstIterator itVl; QStringList::ConstIterator itVis; itVl = allFields.begin(); for ( itVis = visibleFields.begin(); itVis != visibleFields.end() && itVl != allFields.end(); ++itVis, ++itVl ) { if ( *it == *itVis && itVl != allFields.end() ) { orderedFields.append( *itVl ); } } } } else { QValueList<int>::ConstIterator it; for ( it = allFields.begin(); it != allFields.end(); ++it ) orderedFields.append( *it ); slOrderedFields = visibleFields; orderedFields.remove( Qtopia::AddressUid ); orderedFields.remove( Qtopia::Title ); orderedFields.remove( Qtopia::Groups ); orderedFields.remove( Qtopia::AddressCategory ); orderedFields.remove( Qtopia::FirstName ); orderedFields.remove( Qtopia::LastName ); orderedFields.remove( Qtopia::DefaultEmail ); orderedFields.remove( Qtopia::FileAs ); orderedFields.remove( Qtopia::Notes ); orderedFields.remove( Qtopia::Gender ); slOrderedFields.remove( "Name Title" ); slOrderedFields.remove( "First Name" ); slOrderedFields.remove( "Last Name" ); slOrderedFields.remove( "File As" ); slOrderedFields.remove( "Default Email" ); slOrderedFields.remove( "Notes" ); slOrderedFields.remove( "Gender" ); } } AbLabel *AddressbookWindow::abView() { if ( !mView ) { mView = new AbLabel( this, "viewer" ); mView->init( OContact() ); connect( mView, SIGNAL( okPressed() ), this, SLOT( slotListView() ) ); diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index b01583f..bae3a2b 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -39,199 +39,213 @@ static inline bool containsAlphaNum( const QString &str ); static inline bool constainsWhiteSpace( const QString &str ); // helper functions, convert our comma delimited list to proper // file format... void parseEmailFrom( const QString &txt, QString &strDefaultEmail, QString &strAll ); // helper convert from file format to comma delimited... void parseEmailTo( const QString &strDefaultEmail, const QString &strOtherEmail, QString &strBack ); ContactEditor::ContactEditor( const OContact &entry, const QValueList<int> *newOrderedValues, QStringList *slNewOrdered, QWidget *parent, const char *name, WFlags fl ) : QDialog( parent, name, TRUE, fl ), orderedValues( newOrderedValues ), slOrdered( *slNewOrdered ) { init(); initMap(); setEntry( entry ); qDebug("finish"); } ContactEditor::~ContactEditor() { } void ContactEditor::init() { useFullName = TRUE; int i = 0; /** SHut up and stop leaking slHomeAddress = new QStringList; slBusinessAddress = new QStringList; slChooserNames = new QStringList; slChooserValues = new QStringList; slDynamicEntries = new QStringList; */ //*slDynamicEntries = *slOrdered; + QStringList trlChooserNames; + for (i = 0; i <= 6; i++) { slHomeAddress.append( "" ); slBusinessAddress.append( "" ); } { hasGender = FALSE; hasTitle = FALSE; hasCompany = FALSE; hasNotes = FALSE; hasStreet = FALSE; hasStreet2 = FALSE; hasPOBox = FALSE; hasCity = FALSE; hasState = FALSE; hasZip = FALSE; hasCountry = FALSE; QStringList::ConstIterator it = slOrdered.begin(); + for ( i = 0; it != slOrdered.end(); i++, ++it ) { if ( (*it) == "Business Fax" ) { - slChooserNames.append( tr( "Business Fax" ) ); + trlChooserNames.append( tr( "Business Fax" ) ); + slChooserNames.append( *it ); slChooserValues.append("" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Home Fax" ) { - slChooserNames.append( tr( "Home Fax" ) ); + trlChooserNames.append( tr( "Home Fax" ) ); + slChooserNames.append( *it ); slChooserValues.append("" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Business Phone" ) { - slChooserNames.append( tr( "Business Phone" ) ); + trlChooserNames.append( tr( "Business Phone" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Home Phone" ) { - slChooserNames.append( tr( "Home Phone" ) ); + trlChooserNames.append( tr( "Home Phone" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } /* if ( (*it).right( 2 ) == tr( "IM" ) ) { slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } */ if ( (*it) == "Business Mobile" ) { - slChooserNames.append( tr( "Business Mobile" ) ); + trlChooserNames.append( tr( "Business Mobile" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Home Mobile" ) { - slChooserNames.append( tr( "Home Mobile" ) ); + trlChooserNames.append( tr( "Home Mobile" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Business WebPage" ) { - slChooserNames.append( tr( "Business WebPage" ) ); + trlChooserNames.append( tr( "Business WebPage" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Home Web Page" ) { - slChooserNames.append( tr( "Home Web Page" ) ); + trlChooserNames.append( tr( "Home Web Page" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( (*it) == "Business Pager" ) { - slChooserNames.append( tr( "Business Pager" ) ); + trlChooserNames.append( tr( "Business Pager" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( *it == "Default Email" ) { - slChooserNames.append( tr( "Default Email" ) ); + trlChooserNames.append( tr( "Default Email" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( *it == "Emails" ) { - slChooserNames.append( tr( "Emails" ) ); + trlChooserNames.append( tr( "Emails" ) ); + slChooserNames.append( *it ); slChooserValues.append( "" ); //slDynamicEntries->remove( it ); continue; } if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) continue; if ( *it == "Name Title" ) { //slDynamicEntries->remove( it ); continue; } if ( *it == "First Name" ) { // slDynamicEntries->remove( it ); continue; } if ( *it == "Middle Name" ) { // slDynamicEntries->remove( it ); continue; } if ( *it == "Last Name" ) { // slDynamicEntries->remove( it ); continue; } if ( *it == "Suffix" ) { // slDynamicEntries->remove( it ); continue; } if ( *it == "File As" ) { // slDynamicEntries->remove( it ); continue; } if ( *it == "Gender" ) { hasGender = TRUE; // slDynamicEntries->remove( it ); continue; } if ( *it == "Job Title" ) { hasTitle = TRUE; // slDynamicEntries->remove( it ); continue; @@ -704,100 +718,100 @@ void ContactEditor::init() { gl->addWidget( e, i, 1); } l = new QLabel( tr("Gender"), container ); gl->addWidget( l, slDynamicEntries.count(), 0 ); cmbGender = new QComboBox( container ); cmbGender->insertItem( "", 0 ); cmbGender->insertItem( tr("Male"), 1); cmbGender->insertItem( tr("Female"), 2); gl->addWidget( cmbGender, slDynamicEntries.count(), 1 ); tabMain->insertTab( tabViewport, tr( "Details" ) ); dlgNote = new QDialog( this, "Note Dialog", TRUE ); dlgNote->setCaption( tr("Enter Note") ); QVBoxLayout *vbNote = new QVBoxLayout( dlgNote ); txtNote = new QMultiLineEdit( dlgNote ); vbNote->addWidget( txtNote ); connect( btnNote, SIGNAL(clicked()), this, SLOT(slotNote()) ); dlgName = new QDialog( this, "Name Dialog", TRUE ); dlgName->setCaption( tr("Edit Name") ); gl = new QGridLayout( dlgName, 5, 2, 2, 3 ); l = new QLabel( tr("First Name"), dlgName ); gl->addWidget( l, 0, 0 ); txtFirstName = new QLineEdit( dlgName ); gl->addWidget( txtFirstName, 0, 1 ); l = new QLabel( tr("Middle Name"), dlgName ); gl->addWidget( l, 1, 0 ); txtMiddleName = new QLineEdit( dlgName ); gl->addWidget( txtMiddleName, 1, 1 ); l = new QLabel( tr("Last Name"), dlgName ); gl->addWidget( l, 2, 0 ); txtLastName = new QLineEdit( dlgName ); gl->addWidget( txtLastName, 2, 1 ); l = new QLabel( tr("Suffix"), dlgName ); gl->addWidget( l, 3, 0 ); txtSuffix = new QLineEdit( dlgName ); gl->addWidget( txtSuffix, 3, 1 ); space = new QSpacerItem(1,1, QSizePolicy::Maximum, QSizePolicy::MinimumExpanding ); gl->addItem( space, 4, 0 ); - cmbChooserField1->insertStringList( slChooserNames ); - cmbChooserField2->insertStringList( slChooserNames ); - cmbChooserField3->insertStringList( slChooserNames ); - cmbChooserField4->insertStringList( slChooserNames ); + cmbChooserField1->insertStringList( trlChooserNames ); + cmbChooserField2->insertStringList( trlChooserNames ); + cmbChooserField3->insertStringList( trlChooserNames ); + cmbChooserField4->insertStringList( trlChooserNames ); cmbChooserField1->setCurrentItem( 0 ); cmbChooserField2->setCurrentItem( 1 ); cmbChooserField3->setCurrentItem( 2 ); connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); connect( txtChooserField1, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser1Change(const QString &)) ); connect( txtChooserField2, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser2Change(const QString &)) ); connect( txtChooserField3, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser3Change(const QString &)) ); connect( txtChooserField4, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser4Change(const QString &)) ); connect( txtAddress, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddressChange(const QString &)) ); //connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) ); //connect( txtPOBox, SIGNAL(textChanged(const QString &)), this, SLOT(slotPOBoxChange(const QString &)) ); connect( txtCity, SIGNAL(textChanged(const QString &)), this, SLOT(slotCityChange(const QString &)) ); connect( txtState, SIGNAL(textChanged(const QString &)), this, SLOT(slotStateChange(const QString &)) ); connect( txtZip, SIGNAL(textChanged(const QString &)), this, SLOT(slotZipChange(const QString &)) ); connect( cmbCountry, SIGNAL(textChanged(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); connect( cmbCountry, SIGNAL(activated(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); connect( cmbChooserField1, SIGNAL(activated(int)), this, SLOT(slotCmbChooser1Change(int)) ); connect( cmbChooserField2, SIGNAL(activated(int)), this, SLOT(slotCmbChooser2Change(int)) ); connect( cmbChooserField3, SIGNAL(activated(int)), this, SLOT(slotCmbChooser3Change(int)) ); connect( cmbChooserField4, SIGNAL(activated(int)), this, SLOT(slotCmbChooser4Change(int)) ); connect( cmbAddress, SIGNAL(activated(int)), this, SLOT(slotAddressTypeChange(int)) ); new QPEDialogListener(this); } void ContactEditor::initMap() { /* @@ -1315,127 +1329,127 @@ void ContactEditor::setEntry( const OContact &entry ) { if (hasTitle) txtJobTitle->setText( ent.jobTitle() ); if (hasCompany) txtOrganization->setText( ent.company() ); if (hasNotes) txtNote->setText( ent.notes() ); if (hasStreet) { slHomeAddress[0] = ent.homeStreet(); slBusinessAddress[0] = ent.businessStreet(); } /* if (hasStreet2) { (*slHomeAddress)[1] = ent.homeStreet2(); (*slBusinessAddress)[1] = ent.businessStreet2(); } if (hasPOBox) { (*slHomeAddress)[2] = ent.homePOBox(); (*slBusinessAddress)[2] = ent.businessPOBox(); } */ if (hasCity) { slHomeAddress[3] = ent.homeCity(); slBusinessAddress[3] = ent.businessCity(); } if (hasState) { slHomeAddress[4] = ent.homeState(); slBusinessAddress[4] = ent.businessState(); } if (hasZip) { slHomeAddress[5] = ent.homeZip(); slBusinessAddress[5] = ent.businessZip(); } if (hasCountry) { slHomeAddress[6] = ent.homeCountry(); slBusinessAddress[6] = ent.businessCountry(); } QStringList::ConstIterator it; QListIterator<QLineEdit> itLE( listValue ); for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { - if ( *it =="Department" ) + if ( *it == tr( "Department" ) ) (*itLE)->setText( ent.department() ); - if ( *it == "Company" ) + if ( *it == tr( "Company" ) ) (*itLE)->setText( ent.company() ); - if ( *it == "Office" ) + if ( *it == tr( "Office" ) ) (*itLE)->setText( ent.office() ); - if ( *it == "Profession" ) + if ( *it == tr( "Profession" ) ) (*itLE)->setText( ent.profession() ); - if ( *it == "Assistant" ) + if ( *it == tr( "Assistant" ) ) (*itLE)->setText( ent.assistant() ); - if ( *it == "Manager" ) + if ( *it == tr( "Manager" ) ) (*itLE)->setText( ent.manager() ); - if ( *it == "Spouse" ) + if ( *it == tr( "Spouse" ) ) (*itLE)->setText( ent.spouse() ); - if ( *it == "Birthday" ) + if ( *it == tr( "Birthday" ) ) (*itLE)->setText( ent.birthday() ); - if ( *it == "Anniversary" ) + if ( *it == tr( "Anniversary" ) ) (*itLE)->setText( ent.anniversary() ); - if ( *it == "Nickname" ) + if ( *it == tr( "Nickname" ) ) (*itLE)->setText( ent.nickname() ); - if ( *it == "Children" ) + if ( *it == tr( "Children" ) ) (*itLE)->setText( ent.children() ); } QStringList::Iterator itV; for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) *itV = ent.businessPhone(); /* if ( *it == "Business 2 Phone" ) *itV = ent.business2Phone(); */ if ( ( *it == "Business Fax") || ( *it == "Work Fax" ) ) *itV = ent.businessFax(); if ( ( *it == "Business Mobile" ) || ( *it == "work Mobile" ) ) *itV = ent.businessMobile(); /* if ( *it == "Company Phone" ) *itV = ent.companyPhone(); */ if ( *it == "Default Email" ) *itV = ent.defaultEmail(); if ( *it == "Emails" ) *itV = ent.emailList().join(", "); // :SX if ( *it == "Home Phone" ) *itV = ent.homePhone(); /* if ( *it == "Home 2 Phone" ) *itV = ent.home2Phone(); */ if ( *it == "Home Fax" ) *itV = ent.homeFax(); if ( *it == "Home Mobile" ) *itV = ent.homeMobile(); /* if ( *it == "Car Phone" ) *itV = ent.carPhone(); if ( *it == "ISDN Phone" ) *itV = ent.ISDNPhone(); if ( *it == "Other Phone" ) *itV = ent.otherPhone(); @@ -1513,127 +1527,127 @@ void ContactEditor::saveEntry() { if (hasTitle) ent.setJobTitle( txtJobTitle->text() ); if (hasCompany) ent.setCompany( txtOrganization->text() ); if (hasNotes) ent.setNotes( txtNote->text() ); if (hasStreet) { ent.setHomeStreet( slHomeAddress[0] ); ent.setBusinessStreet( slBusinessAddress[0] ); } /* if (hasStreet2) { ent.setHomeStreet2( (*slHomeAddress)[1] ); ent.setBusinessStreet2( (*slBusinessAddress)[1] ); } if (hasPOBox) { ent.setHomePOBox( (*slHomeAddress)[2] ); ent.setBusinessPOBox( (*slBusinessAddress)[2] ); } */ if (hasCity) { ent.setHomeCity( slHomeAddress[3] ); ent.setBusinessCity( slBusinessAddress[3] ); } if (hasState) { ent.setHomeState( slHomeAddress[4] ); ent.setBusinessState( slBusinessAddress[4] ); } if (hasZip) { ent.setHomeZip( slHomeAddress[5] ); ent.setBusinessZip( slBusinessAddress[5] ); } if (hasCountry) { ent.setHomeCountry( slHomeAddress[6] ); ent.setBusinessCountry( slBusinessAddress[6] ); } QStringList::ConstIterator it; QListIterator<QLineEdit> itLE( listValue ); for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { - if ( *it == "Department" ) + if ( *it == tr( "Department" ) ) ent.setDepartment( (*itLE)->text() ); - if ( *it == "Company" ) + if ( *it == tr( "Company" ) ) ent.setCompany( (*itLE)->text() ); - if ( *it == "Office" ) + if ( *it == tr( "Office" ) ) ent.setOffice( (*itLE)->text() ); - if ( *it == "Profession" ) + if ( *it == tr( "Profession" ) ) ent.setProfession( (*itLE)->text() ); - if ( *it == "Assistant" ) + if ( *it == tr( "Assistant" ) ) ent.setAssistant( (*itLE)->text() ); - if ( *it == "Manager" ) + if ( *it == tr( "Manager" ) ) ent.setManager( (*itLE)->text() ); - if ( *it == "Spouse" ) + if ( *it == tr( "Spouse" ) ) ent.setSpouse( (*itLE)->text() ); - if ( *it == "Birthday" ) + if ( *it == tr( "Birthday" ) ) ent.setBirthday( (*itLE)->text() ); - if ( *it == "Anniversary" ) + if ( *it == tr( "Anniversary" ) ) ent.setAnniversary( (*itLE)->text() ); - if ( *it == "Nickname" ) + if ( *it == tr( "Nickname" ) ) ent.setNickname( (*itLE)->text() ); - if ( *it == "Children" ) + if ( *it == tr( "Children" ) ) ent.setChildren( (*itLE)->text() ); } QStringList::ConstIterator itV; for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) ent.setBusinessPhone( *itV ); /* if ( *it == tr("Business 2 Phone" ) ent.setBusiness2Phone( *itV ); */ if ( ( *it == "Business Fax" ) || ( *it == "Work Fax" ) ) ent.setBusinessFax( *itV ); if ( ( *it == "Business Mobile" ) || ( *it == "Work Mobile" ) ) ent.setBusinessMobile( *itV ); /* if ( *it == "Company Phone" ) ent.setCompanyPhone( *itV ); */ //if ( *it == "Default Email" ) //ent.setDefaultEmail( *itV ); if ( *it == "Emails" ){ QString allemail; QString defaultmail; parseEmailFrom( *itV, defaultmail, allemail ); // ent.clearEmails(); ent.setDefaultEmail( defaultmail ); ent.setEmails( allemail ); } if ( *it == "Home Phone" ) ent.setHomePhone( *itV ); /* if ( *it == "Home 2 Phone" ) ent.setHome2Phone( *itV ); */ if ( *it == "Home Fax" ) ent.setHomeFax( *itV ); if ( *it == "Home Mobile" ) ent.setHomeMobile( *itV ); /* if ( *it == "Car Phone" ) ent.setCarPhone( *itV ); |