-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 @@ -959,11 +959,11 @@ bool AddressBook::containsExternalUid( const QString& uid ) return true; } 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 ) ) return (*it); } diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 2351add..18c03b5 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -303,9 +303,9 @@ class AddressBook : public QObject void resetTempSyncStat(); QStringList uidList(); 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 ); void preExternSync( AddressBook* aBook, const QString& csd, bool isSubset ); void postExternSync( AddressBook* aBook, const QString& csd , bool setID ); diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index d60cd6b..3b238f5 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -588,9 +588,9 @@ int Addressee::tempSyncStat() const { return mData->mTempSyncStat; } -QString Addressee::getID( const QString & prof) +const QString Addressee::getID( const QString & prof) const { return KIdManager::getId ( mData->mExternalId, prof ); } @@ -601,9 +601,9 @@ void Addressee::setCsum( const QString & prof , const QString & id ) mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); } -QString Addressee::getCsum( const QString & prof) +const QString Addressee::getCsum( const QString & prof) const { return KIdManager::getCsum ( mData->mExternalId, prof ); } @@ -612,9 +612,9 @@ void Addressee::setIDStr( const QString & s ) detach(); mData->mExternalId = s; } -QString Addressee::IDStr() const +const QString Addressee::IDStr() const { return mData->mExternalId; } @@ -625,9 +625,9 @@ void Addressee::setExternalUID( const QString &id ) mData->empty = false; mData->externalUID = id; } -QString Addressee::externalUID() const +const QString Addressee::externalUID() const { return mData->externalUID; } void Addressee::setOriginalExternalUID( const QString &id ) @@ -652,9 +652,9 @@ void Addressee::setUid( const QString &id ) mData->empty = false; mData->uid = id; } -QString Addressee::uid() const +const QString Addressee::uid() const { if ( mData->uid.isEmpty() ) mData->uid = KApplication::randomString( 10 ); diff --git a/kabc/addressee.h b/kabc/addressee.h index 08d2f56..8051fec 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -99,22 +99,22 @@ class Addressee // sync stuff void setTempSyncStat(int id); 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); ulong getCsum4List( const QStringList & attList); /** Return, if the address book entry is empty. */ bool isEmpty() const; void setExternalUID( const QString &id ); - QString externalUID() const; + const QString externalUID() const; void setOriginalExternalUID( const QString &id ); QString originalExternalUID() const; void mergeContact( const Addressee& ad, bool isSubSet ); void simplifyEmails(); @@ -130,9 +130,9 @@ class Addressee void setUid( const QString &uid ); /** Return unique identifier. */ - QString uid() const; + const QString uid() const; /** Return translated label for uid field. */ static QString uidLabel(); |