author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (side-by-side diff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/net/mailit/addresslist.cpp | |
parent | 0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff) | |
download | opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2 |
QString to const QString
Diffstat (limited to 'noncore/net/mailit/addresslist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/addresslist.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp index 7d60ebf..18d14bc 100644 --- a/noncore/net/mailit/addresslist.cpp +++ b/noncore/net/mailit/addresslist.cpp @@ -36,7 +36,7 @@ AddressList::~AddressList() addresses.clear(); } -void AddressList::addContact(QString email, QString name) +void AddressList::addContact(const QString &email, const QString &name) { //skip if not a valid email address, if (email.find( '@') == -1) @@ -51,17 +51,17 @@ void AddressList::addContact(QString email, QString name) } } -bool AddressList::containsEmail(QString email) +bool AddressList::containsEmail(const QString &email) { return ( getEmailRef(email) != -1 ); } -bool AddressList::containsName(QString name) +bool AddressList::containsName(const QString &name) { return ( getNameRef(name) != -1 ); } -QString AddressList::getNameByEmail(QString email) +QString AddressList::getNameByEmail(const QString &email) { int pos = getEmailRef(email); if (pos != -1) { @@ -72,7 +72,7 @@ QString AddressList::getNameByEmail(QString email) return NULL; } -QString AddressList::getEmailByName(QString name) +QString AddressList::getEmailByName(const QString &name) { int pos = getNameRef(name); if (pos != -1) { @@ -83,7 +83,7 @@ QString AddressList::getEmailByName(QString name) return NULL; } -int AddressList::getEmailRef(QString email) +int AddressList::getEmailRef(const QString &email) { int pos = 0; Contact *ptr; @@ -96,7 +96,7 @@ int AddressList::getEmailRef(QString email) return -1; } -int AddressList::getNameRef(QString name) +int AddressList::getNameRef(const QString &name) { int pos = 0; Contact *ptr; @@ -148,7 +148,7 @@ void AddressList::read() f.close();*/ } -QString AddressList::getRightString(QString in) +QString AddressList::getRightString(const QString &in) { QString out = ""; |