summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Adam <adam@kde.org>2008-01-14 22:53:45 +0000
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-04-23 22:44:50 +0900
commitb07b3401ab3167d0d83078ce52705e5aa49c9776 (patch)
tree80a81fde5db9e9ffdf8c9a54e443c7d576a81aeb
parentfcd267d0363d26be78a5652da81cb470d0a9fc46 (diff)
downloadtdepim-b07b3401ab3167d0d83078ce52705e5aa49c9776.tar.gz
tdepim-b07b3401ab3167d0d83078ce52705e5aa49c9776.zip
Make getStr const correct.
Cherry-picked from: 925d1f70010bc111ad9f4a3e910d689aa4e27181 Signed-off-by: Luke Dashjr <luke-jr+git@utopios.org>
-rw-r--r--tdeioslave/imap4/mailaddress.cc7
-rw-r--r--tdeioslave/imap4/mailaddress.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/tdeioslave/imap4/mailaddress.cc b/tdeioslave/imap4/mailaddress.cc
index 866484584..915a3bbbe 100644
--- a/tdeioslave/imap4/mailaddress.cc
+++ b/tdeioslave/imap4/mailaddress.cc
@@ -197,14 +197,15 @@ mailAddress::parseAddress (char *aCStr)
}
const TQCString
-mailAddress::getStr ()
+mailAddress::getStr () const
{
TQCString retVal(128); // Should be generally big enough
if (!rawFullName.isEmpty ())
{
- KMime::addQuotes( rawFullName, false );
- retVal = rawFullName + " ";
+ TQCString tmpName( rawFullName );
+ KMime::addQuotes( tmpName, false );
+ retVal = tmpName + " ";
}
if (!user.isEmpty ())
{
diff --git a/tdeioslave/imap4/mailaddress.h b/tdeioslave/imap4/mailaddress.h
index 644034b24..6b4b2c6ea 100644
--- a/tdeioslave/imap4/mailaddress.h
+++ b/tdeioslave/imap4/mailaddress.h
@@ -63,7 +63,7 @@ public:
const TQCString & getCommentRaw () const;
int parseAddress (char *);
- const TQCString getStr ();
+ const TQCString getStr () const;
bool isEmpty () const;
static TQString emailAddrAsAnchor (const mailAddress &, bool);