summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailhandler.cpp
authorllornkcor <llornkcor>2003-05-24 01:20:33 (UTC)
committer llornkcor <llornkcor>2003-05-24 01:20:33 (UTC)
commit62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (side-by-side diff)
tree2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/unsupported/mailit/emailhandler.cpp
parent0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff)
downloadopie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip
opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz
opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2
QString to const QString
Diffstat (limited to 'noncore/unsupported/mailit/emailhandler.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 62fa64f..59ccd90 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -139,25 +139,25 @@ void EmailHandler::getMailByList(MailList *mailList)
void EmailHandler::messageArrived(const QString &message, int id, uint size, bool complete)
{
Email mail;
mail.rawMail = message;
mail.serverId = id;
mail.size = size;
mail.downloaded = complete;
emit mailArrived(mail, FALSE);
}
-bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
+bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mail)
{
QString temp, boundary;
int pos;
QString delimiter, header, body, mimeHeader, mimeBody;
QString content, contentType, contentAttribute, id, encoding;
QString fileName, storedName;
int enclosureId = 0;
mail->rawMail = in;
mail->received = TRUE;
mail->files.setAutoDelete(TRUE);
@@ -501,25 +501,25 @@ int EmailHandler::encodeMime(Email *mail)
fi.fileName() + "\"\r\n\r\n";
if (encodeFile(fileName, &newBody) == -1) //file not found?
return -1;
}
newBody += "\r\n\r\n--" + boundary + "--";
mail->rawMail = newBody;
return 0;
}
-int EmailHandler::encodeFile(QString fileName, QString *toBody)
+int EmailHandler::encodeFile(const QString &fileName, QString *toBody)
{
char *fileData;
char *dataPtr;
QString temp;
uint dataSize, count;
QFile f(fileName);
if (! f.open(IO_ReadOnly) ) {
qWarning("could not open file: " + fileName);
return -1;
}
QTextStream s(&f);