-rw-r--r-- | kabc/distributionlist.cpp | 32 | ||||
-rw-r--r-- | kabc/distributionlisteditor.cpp | 1 |
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 ) | |||
52 | { | 52 | { |
53 | Entry e( a, email ); | 53 | QString em = email; |
54 | 54 | if (em.isNull() ) | |
55 | em = a.preferredEmail(); | ||
56 | Entry e( a, em ); | ||
55 | QValueList<Entry>::Iterator it; | 57 | QValueList<Entry>::Iterator it; |
@@ -61,6 +63,6 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email ) | |||
61 | */ | 63 | */ |
62 | if ( ( (*it).email.isNull() && email.isEmpty() ) || | 64 | if ( ( (*it).email.isNull() && em.isEmpty() ) || |
63 | ( (*it).email.isEmpty() && email.isNull() ) || | 65 | ( (*it).email.isEmpty() && em.isNull() ) || |
64 | ( (*it).email == email ) ) { | 66 | ( (*it).email == em ) ) { |
65 | *it = e; | 67 | //*it = e; |
66 | return; | 68 | return; |
@@ -180,5 +182,5 @@ bool DistributionListManager::load() | |||
180 | //US we work in microkde with a list of distributionlists | 182 | //US we work in microkde with a list of distributionlists |
181 | QStringList distlists = cfg.readListEntry( "Lists" ); | 183 | QStringList distlists = cfg.readListEntry( "__Lists__List__" ); |
182 | if ( distlists.isEmpty() ) { | 184 | if ( distlists.isEmpty() ) { |
183 | kdDebug(5700) << "No distlists for '" << mAddressBook->identifier() << "'" << endl; | 185 | qDebug("no distlist for AB "); |
184 | return false; | 186 | return false; |
@@ -193,3 +195,3 @@ bool DistributionListManager::load() | |||
193 | 195 | ||
194 | kdDebug(5700) << "DLM::load(): " << name << ": " << value.join(",") << endl; | 196 | |
195 | 197 | ||
@@ -202,3 +204,3 @@ bool DistributionListManager::load() | |||
202 | 204 | ||
203 | kdDebug(5700) << "----- Entry " << id << endl; | 205 | |
204 | 206 | ||
@@ -219,3 +221,3 @@ bool DistributionListManager::save() | |||
219 | { | 221 | { |
220 | kdDebug(5700) << "DistListManager::save()" << endl; | 222 | |
221 | 223 | ||
@@ -234,3 +236,7 @@ bool DistributionListManager::save() | |||
234 | value.append( (*it).addressee.uid() ); | 236 | value.append( (*it).addressee.uid() ); |
235 | value.append( (*it).email ); | 237 | if (( *it).email.isEmpty()) |
238 | value.append( " " ); | ||
239 | else | ||
240 | value.append( (*it).email ); | ||
241 | // qDebug("uid *%s* email *%s* ", (*it).addressee.uid().latin1(),(*it).email.latin1() ); | ||
236 | } | 242 | } |
@@ -245,3 +251,3 @@ bool DistributionListManager::save() | |||
245 | } | 251 | } |
246 | cfg.writeEntry( "Lists", namelist ); | 252 | cfg.writeEntry( "__Lists__List__", namelist ); |
247 | 253 | ||
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 | |||
72 | { | 72 | { |
73 | |||
73 | EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); | 74 | EmailSelectDialog *dlg = new EmailSelectDialog( emails, current, parent ); |