author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (unidiff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/net/mailit/emailhandler.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/emailhandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/emailhandler.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp index 62fa64f..59ccd90 100644 --- a/noncore/net/mailit/emailhandler.cpp +++ b/noncore/net/mailit/emailhandler.cpp | |||
@@ -39,7 +39,7 @@ Enclosure* EnclosureList::dupl(Enclosure *in) | |||
39 | 39 | ||
40 | EmailHandler::EmailHandler() | 40 | EmailHandler::EmailHandler() |
41 | { | 41 | { |
42 | qDebug("EMailHandler::EmailHandler"); | 42 | qDebug("EMailHandler::EmailHandler"); |
43 | 43 | ||
44 | smtpClient = new SmtpClient(); | 44 | smtpClient = new SmtpClient(); |
45 | popClient = new PopClient(); | 45 | popClient = new PopClient(); |
@@ -148,7 +148,7 @@ void EmailHandler::messageArrived(const QString &message, int id, uint size, boo | |||
148 | emit mailArrived(mail, FALSE); | 148 | emit mailArrived(mail, FALSE); |
149 | } | 149 | } |
150 | 150 | ||
151 | bool EmailHandler::parse(QString in, QString lineShift, Email *mail) | 151 | bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mail) |
152 | { | 152 | { |
153 | QString temp, boundary; | 153 | QString temp, boundary; |
154 | int pos; | 154 | int pos; |
@@ -204,21 +204,21 @@ bool EmailHandler::parse(QString in, QString lineShift, Email *mail) | |||
204 | //Search for To: after the FROM: attribute to prevent hitting the Delivered-To: | 204 | //Search for To: after the FROM: attribute to prevent hitting the Delivered-To: |
205 | while((pos = p.find("TO",':', pos+1, TRUE))!=-1) | 205 | while((pos = p.find("TO",':', pos+1, TRUE))!=-1) |
206 | { | 206 | { |
207 | QString rec; | 207 | QString rec; |
208 | 208 | ||
209 | if (p.separatorAt(pos-1)!='-')//The - separator means that this is a Delivered-To: or Reply-To: | 209 | if (p.separatorAt(pos-1)!='-') //The - separator means that this is a Delivered-To: or Reply-To: |
210 | { | 210 | { |
211 | pos++; | 211 | pos++; |
212 | mail->recipients.append(p.getString(&pos, '\r', TRUE)); | 212 | mail->recipients.append(p.getString(&pos, '\r', TRUE)); |
213 | } | 213 | } |
214 | } | 214 | } |
215 | // | 215 | // |
216 | //if (pos==-1) mail->recipients.append (tr("undisclosed recipients") ); | 216 | //if (pos==-1) mail->recipients.append (tr("undisclosed recipients") ); |
217 | 217 | ||
218 | if ((pos = p.find("CC",':', 0, TRUE)) != -1) | 218 | if ((pos = p.find("CC",':', 0, TRUE)) != -1) |
219 | { | 219 | { |
220 | pos++; | 220 | pos++; |
221 | mail->carbonCopies.append (p.getString(&pos, 'z', TRUE) ); | 221 | mail->carbonCopies.append (p.getString(&pos, 'z', TRUE) ); |
222 | } | 222 | } |
223 | 223 | ||
224 | if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { | 224 | if ((pos = p.find("SUBJECT",':', 0, TRUE)) != -1) { |
@@ -440,8 +440,8 @@ int EmailHandler::encodeMime(Email *mail) | |||
440 | Enclosure *ePtr; | 440 | Enclosure *ePtr; |
441 | 441 | ||
442 | QString userName = mailAccount.name; | 442 | QString userName = mailAccount.name; |
443 | if (userName.length()>0)//only embrace it if there is a user name | 443 | if (userName.length()>0) //only embrace it if there is a user name |
444 | userName += " <" + mailAccount.emailAddress + ">"; | 444 | userName += " <" + mailAccount.emailAddress + ">"; |
445 | 445 | ||
446 | //add standard headers | 446 | //add standard headers |
447 | newBody = "From: " + userName + "\r\nTo: "; | 447 | newBody = "From: " + userName + "\r\nTo: "; |
@@ -510,7 +510,7 @@ int EmailHandler::encodeMime(Email *mail) | |||
510 | return 0; | 510 | return 0; |
511 | } | 511 | } |
512 | 512 | ||
513 | int EmailHandler::encodeFile(QString fileName, QString *toBody) | 513 | int EmailHandler::encodeFile(const QString &fileName, QString *toBody) |
514 | { | 514 | { |
515 | char *fileData; | 515 | char *fileData; |
516 | char *dataPtr; | 516 | char *dataPtr; |