summaryrefslogtreecommitdiffabout
path: root/kabc/distributionlist.cpp
Unidiff
Diffstat (limited to 'kabc/distributionlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/distributionlist.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index d34ba0b..cf5afa6 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -20,12 +20,14 @@
20 20
21#include <ksimpleconfig.h> 21#include <ksimpleconfig.h>
22#include <kstandarddirs.h> 22#include <kstandarddirs.h>
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "distributionlist.h" 25#include "distributionlist.h"
26//Added by qt3to4:
27#include <Q3ValueList>
26 28
27using namespace KABC; 29using namespace KABC;
28 30
29DistributionList::DistributionList( DistributionListManager *manager, 31DistributionList::DistributionList( DistributionListManager *manager,
30 const QString &name ) : 32 const QString &name ) :
31 mManager( manager ), mName( name ) 33 mManager( manager ), mName( name )
@@ -51,13 +53,13 @@ QString DistributionList::name() const
51void DistributionList::insertEntry( const Addressee &a, const QString &email ) 53void DistributionList::insertEntry( const Addressee &a, const QString &email )
52{ 54{
53 QString em = email; 55 QString em = email;
54 if (em.isNull() ) 56 if (em.isNull() )
55 em = a.preferredEmail(); 57 em = a.preferredEmail();
56 Entry e( a, em ); 58 Entry e( a, em );
57 QValueList<Entry>::Iterator it; 59 Q3ValueList<Entry>::Iterator it;
58 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 60 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
59 if ( (*it).addressee.uid() == a.uid() ) { 61 if ( (*it).addressee.uid() == a.uid() ) {
60 /** 62 /**
61 We have to check if both email addresses contains no data, 63 We have to check if both email addresses contains no data,
62 a simple 'email1 == email2' wont work here 64 a simple 'email1 == email2' wont work here
63 */ 65 */
@@ -71,13 +73,13 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
71 } 73 }
72 mEntries.append( e ); 74 mEntries.append( e );
73} 75}
74 76
75void DistributionList::removeEntry( const Addressee &a, const QString &email ) 77void DistributionList::removeEntry( const Addressee &a, const QString &email )
76{ 78{
77 QValueList<Entry>::Iterator it; 79 Q3ValueList<Entry>::Iterator it;
78 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 80 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
79 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { 81 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) {
80 mEntries.remove( it ); 82 mEntries.remove( it );
81 return; 83 return;
82 } 84 }
83 } 85 }