Diffstat (limited to 'core/pim/addressbook/abeditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abeditor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp index 6354db9..91e8722 100644 --- a/core/pim/addressbook/abeditor.cpp +++ b/core/pim/addressbook/abeditor.cpp @@ -42,25 +42,25 @@ 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 ); -AbEditor::AbEditor( const Contact &entry, const QValueList<int> *newOrdered, +AbEditor::AbEditor( const OContact &entry, const QValueList<int> *newOrdered, QStringList *slNewOrdered, QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ) : QDialog( parent, name, TRUE, fl ), orderedValues( newOrdered ), slOrdered( slNewOrdered ) { init(); initMap(); setEntry( entry ); } AbEditor::~AbEditor() @@ -173,25 +173,25 @@ void AbEditor::initMap() */ } void AbEditor::loadFields() { QStringList::ConstIterator it; QListIterator<QLabel> lit( listName ); for ( it = slOrdered->begin(); *lit; ++lit, ++it ) { (*lit)->setText( *it ); } } -void AbEditor::setEntry( const Contact &entry ) +void AbEditor::setEntry( const OContact &entry ) { ent = entry; QListIterator<QLineEdit> it( listValue ); firstEdit->setText( ent.firstName() ); lastEdit->setText( ent.lastName() ); cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); // ### Fix... QValueList<int>::ConstIterator itVl; for ( itVl = orderedValues->begin(); *it && itVl != orderedValues->end(); ++itVl, ++it ) { switch( *itVl ) { @@ -540,24 +540,25 @@ void AbEditor::slotNote() void AbEditor::setNameFocus() { firstEdit->setFocus(); } void parseEmailFrom( const QString &txt, QString &strDefaultEmail, QString &strAll ) { int where, start; if ( txt.isEmpty() ) return; + // find the first where = txt.find( ',' ); if ( where < 0 ) { strDefaultEmail = txt; strAll = txt; } else { strDefaultEmail = txt.left( where ).stripWhiteSpace(); strAll = strDefaultEmail; while ( where > -1 ) { strAll.append(" "); start = where; where = txt.find( ',', where + 1 ); |