summaryrefslogtreecommitdiff
path: root/noncore/net/mailit
authorllornkcor <llornkcor>2003-05-24 02:07:21 (UTC)
committer llornkcor <llornkcor>2003-05-24 02:07:21 (UTC)
commit694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9 (patch) (side-by-side diff)
tree6c3f2a5837e32adf2755de4f90d3590d585f1a96 /noncore/net/mailit
parent62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (diff)
downloadopie-694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9.zip
opie-694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9.tar.gz
opie-694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9.tar.bz2
fix for a few crashes. one being stack overwrite. please test before I commit to 0_99
Diffstat (limited to 'noncore/net/mailit') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/emailclient.cpp8
-rw-r--r--noncore/net/mailit/emailhandler.cpp8
-rw-r--r--noncore/net/mailit/mailitwindow.cpp22
3 files changed, 21 insertions, 17 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index 2102ba7..da1226c 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -469,10 +469,10 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
if ((!found)||(fromDisk)) {
item = new EmailListItem(inboxView, newMail, TRUE);
}
- if (item->getMail()->files.count()>0)
- {
- item->setPixmap(0, Resource::loadPixmap("mailit/attach"));
- }
+// if (item->getMail()->files.count()>0)
+// {
+// item->setPixmap(0, Resource::loadPixmap("mailit/attach"));
+// }
/*if (!newMail.downloaded)
mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp
index 59ccd90..39f693d 100644
--- a/noncore/net/mailit/emailhandler.cpp
+++ b/noncore/net/mailit/emailhandler.cpp
@@ -175,8 +175,10 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
if ((body.at(body.length()-2) == '.') && (body.at(body.length()-3) == '\n'))
body.truncate(body.length()-2);
- TextParser p(header, lineShift);
-
+ // TextParser p(header, lineShift);
+ TextParser * lp = new TextParser(header, lineShift);
+#define p (*lp)
+
if ((pos = p.find("FROM",':', 0, TRUE)) != -1) {
pos++;
if (p.separatorAt(pos) == ' ') {
@@ -270,6 +272,7 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
if (boundary == "") { //fooled by Mime-Version
mail->body = body;
mail->bodyPlain = body;
+ delete lp;
return mail;
}
@@ -338,6 +341,7 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
mail->bodyPlain = body;
mail->body = body;
}
+ delete lp;
return TRUE;
}
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp
index a111241..f945a0f 100644
--- a/noncore/net/mailit/mailitwindow.cpp
+++ b/noncore/net/mailit/mailitwindow.cpp
@@ -122,25 +122,25 @@ void MailItWindow::viewMail(QListView *view, Email *mail)
if ((mail->received)&&(!mail->downloaded))
{
- QMessageBox mb( tr("Mail not downloaded"),
+ QMessageBox mb( tr("Mail not downloaded"),
tr("The mail you have clicked \n"
- "has not been downloaded yet.\n "
- "Would you like to do it now ?"),
+ "has not been downloaded yet.\n "
+ "Would you like to do it now ?"),
QMessageBox::Information,
QMessageBox::Yes | QMessageBox::Default,
QMessageBox::No | QMessageBox::Escape,0 );
-
- result=mb.exec();
-
- if (result==QMessageBox::Yes)
- {
- emailClient->download(mail);
- }
+
+ result=mb.exec();
+
+ if (result==QMessageBox::Yes)
+ {
+ emailClient->download(mail);
+ }
}
readMail->update(view, mail);
views->raiseWidget(readMail);
- setCaption( tr( "Examine mail" ) );
+ setCaption( tr( "Read Mail" ) );
}
void MailItWindow::updateMailView(Email *mail)