summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/distributionlist.cpp32
-rw-r--r--kabc/distributionlisteditor.cpp1
2 files changed, 20 insertions, 13 deletions
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index 45b9dda..0735aba 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -52,4 +52,6 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
{
- Entry e( a, email );
-
+ QString em = email;
+ if (em.isNull() )
+ em = a.preferredEmail();
+ Entry e( a, em );
QValueList<Entry>::Iterator it;
@@ -61,6 +63,6 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
*/
- if ( ( (*it).email.isNull() && email.isEmpty() ) ||
- ( (*it).email.isEmpty() && email.isNull() ) ||
- ( (*it).email == email ) ) {
- *it = e;
+ if ( ( (*it).email.isNull() && em.isEmpty() ) ||
+ ( (*it).email.isEmpty() && em.isNull() ) ||
+ ( (*it).email == em ) ) {
+ //*it = e;
return;
@@ -180,5 +182,5 @@ bool DistributionListManager::load()
//US we work in microkde with a list of distributionlists
- QStringList distlists = cfg.readListEntry( "Lists" );
+ QStringList distlists = cfg.readListEntry( "__Lists__List__" );
if ( distlists.isEmpty() ) {
- kdDebug(5700) << "No distlists for '" << mAddressBook->identifier() << "'" << endl;
+ qDebug("no distlist for AB ");
return false;
@@ -193,3 +195,3 @@ bool DistributionListManager::load()
- kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl;
+
@@ -202,3 +204,3 @@ bool DistributionListManager::load()
- kdDebug(5700) << "----- Entry " << id << endl;
+
@@ -219,3 +221,3 @@ bool DistributionListManager::save()
{
- kdDebug(5700) << "DistListManager::save()" << endl;
+
@@ -234,3 +236,7 @@ bool DistributionListManager::save()
value.append( (*it).addressee.uid() );
- value.append( (*it).email );
+ if (( *it).email.isEmpty())
+ value.append( " " );
+ else
+ value.append( (*it).email );
+ // qDebug("uid *%s* email *%s* ", (*it).addressee.uid().latin1(),(*it).email.latin1() );
}
@@ -245,3 +251,3 @@ bool DistributionListManager::save()
}
- cfg.writeEntry( "Lists", namelist );
+ cfg.writeEntry( "__Lists__List__", namelist );
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 8b485d8..bad1efc 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -72,2 +72,3 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
{
+
EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent );