summaryrefslogtreecommitdiffabout
path: root/kabc
Unidiff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp4
-rw-r--r--kabc/addressbook.h2
-rw-r--r--kabc/addressee.cpp10
-rw-r--r--kabc/addressee.h10
4 files changed, 13 insertions, 13 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 4de7da2..9e61261 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -957,15 +957,15 @@ bool AddressBook::containsExternalUid( const QString& uid )
957 for ( it = begin(); it != end(); ++it ) { 957 for ( it = begin(); it != end(); ++it ) {
958 if ( uid == (*it).externalUID( ) ) 958 if ( uid == (*it).externalUID( ) )
959 return true; 959 return true;
960 } 960 }
961 return false; 961 return false;
962} 962}
963Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) 963const Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) const
964{ 964{
965 Iterator it; 965 ConstIterator it;
966 for ( it = begin(); it != end(); ++it ) { 966 for ( it = begin(); it != end(); ++it ) {
967 if ( uid == (*it).getID( profile ) ) 967 if ( uid == (*it).getID( profile ) )
968 return (*it); 968 return (*it);
969 } 969 }
970 return Addressee(); 970 return Addressee();
971} 971}
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index 2351add..18c03b5 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -301,13 +301,13 @@ class AddressBook : public QObject
301 // sync stuff 301 // sync stuff
302 //Addressee::List getExternLastSyncAddressees(); 302 //Addressee::List getExternLastSyncAddressees();
303 void resetTempSyncStat(); 303 void resetTempSyncStat();
304 QStringList uidList(); 304 QStringList uidList();
305 void removeSyncAddressees( bool removeDeleted = false ); 305 void removeSyncAddressees( bool removeDeleted = false );
306 void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset ); 306 void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset );
307 Addressee findByExternUid( const QString& uid , const QString& profile ); 307 const Addressee findByExternUid( const QString& uid , const QString& profile ) const;
308 bool containsExternalUid( const QString& uid ); 308 bool containsExternalUid( const QString& uid );
309 309
310 void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset ); 310 void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset );
311 void postExternSync( AddressBook* aBook, const QString& csd , bool setID ); 311 void postExternSync( AddressBook* aBook, const QString& csd , bool setID );
312 signals: 312 signals:
313 /** 313 /**
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index d60cd6b..3b238f5 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -586,50 +586,50 @@ void Addressee::setTempSyncStat( int id )
586} 586}
587int Addressee::tempSyncStat() const 587int Addressee::tempSyncStat() const
588{ 588{
589 return mData->mTempSyncStat; 589 return mData->mTempSyncStat;
590} 590}
591 591
592QString Addressee::getID( const QString & prof) 592const QString Addressee::getID( const QString & prof) const
593{ 593{
594 return KIdManager::getId ( mData->mExternalId, prof ); 594 return KIdManager::getId ( mData->mExternalId, prof );
595} 595}
596 596
597void Addressee::setCsum( const QString & prof , const QString & id ) 597void Addressee::setCsum( const QString & prof , const QString & id )
598{ 598{
599 detach(); 599 detach();
600 //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); 600 //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() );
601 mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); 601 mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id );
602 //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); 602 //qDebug("setcsum2 %s ",mData->mExternalId.latin1() );
603} 603}
604 604
605QString Addressee::getCsum( const QString & prof) 605const QString Addressee::getCsum( const QString & prof) const
606{ 606{
607 return KIdManager::getCsum ( mData->mExternalId, prof ); 607 return KIdManager::getCsum ( mData->mExternalId, prof );
608} 608}
609 609
610void Addressee::setIDStr( const QString & s ) 610void Addressee::setIDStr( const QString & s )
611{ 611{
612 detach(); 612 detach();
613 mData->mExternalId = s; 613 mData->mExternalId = s;
614} 614}
615 615
616QString Addressee::IDStr() const 616const QString Addressee::IDStr() const
617{ 617{
618 return mData->mExternalId; 618 return mData->mExternalId;
619} 619}
620 620
621void Addressee::setExternalUID( const QString &id ) 621void Addressee::setExternalUID( const QString &id )
622{ 622{
623 if ( id == mData->externalUID ) return; 623 if ( id == mData->externalUID ) return;
624 detach(); 624 detach();
625 mData->empty = false; 625 mData->empty = false;
626 mData->externalUID = id; 626 mData->externalUID = id;
627} 627}
628 628
629QString Addressee::externalUID() const 629const QString Addressee::externalUID() const
630{ 630{
631 return mData->externalUID; 631 return mData->externalUID;
632} 632}
633void Addressee::setOriginalExternalUID( const QString &id ) 633void Addressee::setOriginalExternalUID( const QString &id )
634{ 634{
635 if ( id == mData->originalExternalUID ) return; 635 if ( id == mData->originalExternalUID ) return;
@@ -650,13 +650,13 @@ void Addressee::setUid( const QString &id )
650 detach(); 650 detach();
651 //qDebug("****setuid %s ", id.latin1()); 651 //qDebug("****setuid %s ", id.latin1());
652 mData->empty = false; 652 mData->empty = false;
653 mData->uid = id; 653 mData->uid = id;
654} 654}
655 655
656QString Addressee::uid() const 656const QString Addressee::uid() const
657{ 657{
658 if ( mData->uid.isEmpty() ) 658 if ( mData->uid.isEmpty() )
659 mData->uid = KApplication::randomString( 10 ); 659 mData->uid = KApplication::randomString( 10 );
660 660
661 return mData->uid; 661 return mData->uid;
662} 662}
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 08d2f56..8051fec 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -97,26 +97,26 @@ class Addressee
97 bool operator==( const Addressee & ) const; 97 bool operator==( const Addressee & ) const;
98 bool operator!=( const Addressee & ) const; 98 bool operator!=( const Addressee & ) const;
99 // sync stuff 99 // sync stuff
100 void setTempSyncStat(int id); 100 void setTempSyncStat(int id);
101 int tempSyncStat() const; 101 int tempSyncStat() const;
102 void setIDStr( const QString & ); 102 void setIDStr( const QString & );
103 QString IDStr() const; 103 const QString IDStr() const;
104 void setID( const QString &, const QString & ); 104 void setID( const QString &, const QString & );
105 QString getID( const QString & ); 105 const QString getID( const QString & ) const;
106 void setCsum( const QString &, const QString & ); 106 void setCsum( const QString &, const QString & );
107 QString getCsum( const QString & ); 107 const QString getCsum( const QString & ) const ;
108 void removeID(const QString &); 108 void removeID(const QString &);
109 void computeCsum(const QString &dev); 109 void computeCsum(const QString &dev);
110 ulong getCsum4List( const QStringList & attList); 110 ulong getCsum4List( const QStringList & attList);
111 /** 111 /**
112 Return, if the address book entry is empty. 112 Return, if the address book entry is empty.
113 */ 113 */
114 bool isEmpty() const; 114 bool isEmpty() const;
115 void setExternalUID( const QString &id ); 115 void setExternalUID( const QString &id );
116 QString externalUID() const; 116 const QString externalUID() const;
117 void setOriginalExternalUID( const QString &id ); 117 void setOriginalExternalUID( const QString &id );
118 QString originalExternalUID() const; 118 QString originalExternalUID() const;
119 void mergeContact( const Addressee& ad, bool isSubSet ); 119 void mergeContact( const Addressee& ad, bool isSubSet );
120 void simplifyEmails(); 120 void simplifyEmails();
121 void simplifyAddresses(); 121 void simplifyAddresses();
122 void simplifyPhoneNumbers(); 122 void simplifyPhoneNumbers();
@@ -128,13 +128,13 @@ class Addressee
128 Set unique identifier. 128 Set unique identifier.
129 */ 129 */
130 void setUid( const QString &uid ); 130 void setUid( const QString &uid );
131 /** 131 /**
132 Return unique identifier. 132 Return unique identifier.
133 */ 133 */
134 QString uid() const; 134 const QString uid() const;
135 /** 135 /**
136 Return translated label for uid field. 136 Return translated label for uid field.
137 */ 137 */
138 static QString uidLabel(); 138 static QString uidLabel();
139 139
140 /** 140 /**