-rw-r--r-- | kabc/addressbook.cpp | 4 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 | ||||
-rw-r--r-- | kabc/addressee.cpp | 10 | ||||
-rw-r--r-- | kabc/addressee.h | 10 |
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 @@ -961,7 +961,7 @@ bool AddressBook::containsExternalUid( const QString& uid ) return false; } -Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) +const Addressee AddressBook::findByExternUid( const QString& uid , const QString& profile ) const { - Iterator it; + ConstIterator it; for ( it = begin(); it != end(); ++it ) { if ( uid == (*it).getID( profile ) ) diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 2351add..18c03b5 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -305,5 +305,5 @@ class AddressBook : public QObject void removeSyncAddressees( bool removeDeleted = false ); void mergeAB( AddressBook *aBook, const QString& profile, bool isSubset ); - Addressee findByExternUid( const QString& uid , const QString& profile ); + const Addressee findByExternUid( const QString& uid , const QString& profile ) const; bool containsExternalUid( const QString& uid ); diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index d60cd6b..3b238f5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -590,5 +590,5 @@ int Addressee::tempSyncStat() const } -QString Addressee::getID( const QString & prof) +const QString Addressee::getID( const QString & prof) const { return KIdManager::getId ( mData->mExternalId, prof ); @@ -603,5 +603,5 @@ void Addressee::setCsum( const QString & prof , const QString & id ) } -QString Addressee::getCsum( const QString & prof) +const QString Addressee::getCsum( const QString & prof) const { return KIdManager::getCsum ( mData->mExternalId, prof ); @@ -614,5 +614,5 @@ void Addressee::setIDStr( const QString & s ) } -QString Addressee::IDStr() const +const QString Addressee::IDStr() const { return mData->mExternalId; @@ -627,5 +627,5 @@ void Addressee::setExternalUID( const QString &id ) } -QString Addressee::externalUID() const +const QString Addressee::externalUID() const { return mData->externalUID; @@ -654,5 +654,5 @@ void Addressee::setUid( const QString &id ) } -QString Addressee::uid() const +const QString Addressee::uid() const { if ( mData->uid.isEmpty() ) diff --git a/kabc/addressee.h b/kabc/addressee.h index 08d2f56..8051fec 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -101,9 +101,9 @@ class Addressee int tempSyncStat() const; void setIDStr( const QString & ); - QString IDStr() const; + const QString IDStr() const; void setID( const QString &, const QString & ); - QString getID( const QString & ); + const QString getID( const QString & ) const; void setCsum( const QString &, const QString & ); - QString getCsum( const QString & ); + const QString getCsum( const QString & ) const ; void removeID(const QString &); void computeCsum(const QString &dev); @@ -114,5 +114,5 @@ class Addressee bool isEmpty() const; void setExternalUID( const QString &id ); - QString externalUID() const; + const QString externalUID() const; void setOriginalExternalUID( const QString &id ); QString originalExternalUID() const; @@ -132,5 +132,5 @@ class Addressee Return unique identifier. */ - QString uid() const; + const QString uid() const; /** Return translated label for uid field. |