author | llornkcor <llornkcor> | 2003-05-24 02:07:21 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 02:07:21 (UTC) |
commit | 694ff39fe4f0f4164edd7a2a80abe6be3a4fa2f9 (patch) (unidiff) | |
tree | 6c3f2a5837e32adf2755de4f90d3590d585f1a96 | |
parent | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (diff) | |
download | opie-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
-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mailit/emailhandler.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mailit/mailitwindow.cpp | 22 | ||||
-rw-r--r-- | noncore/unsupported/mailit/emailclient.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/mailit/emailhandler.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/mailit/mailitwindow.cpp | 22 |
6 files changed, 42 insertions, 34 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 | |||
@@ -471,6 +471,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
471 | } | 471 | } |
472 | if (item->getMail()->files.count()>0) | 472 | // if (item->getMail()->files.count()>0) |
473 | { | 473 | // { |
474 | item->setPixmap(0, Resource::loadPixmap("mailit/attach")); | 474 | // item->setPixmap(0, Resource::loadPixmap("mailit/attach")); |
475 | } | 475 | // } |
476 | /*if (!newMail.downloaded) | 476 | /*if (!newMail.downloaded) |
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 | |||
@@ -177,4 +177,6 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
177 | 177 | ||
178 | TextParser p(header, lineShift); | 178 | // TextParser p(header, lineShift); |
179 | 179 | TextParser * lp = new TextParser(header, lineShift); | |
180 | #define p (*lp) | ||
181 | |||
180 | if ((pos = p.find("FROM",':', 0, TRUE)) != -1) { | 182 | if ((pos = p.find("FROM",':', 0, TRUE)) != -1) { |
@@ -272,2 +274,3 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
272 | mail->bodyPlain = body; | 274 | mail->bodyPlain = body; |
275 | delete lp; | ||
273 | return mail; | 276 | return mail; |
@@ -340,2 +343,3 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
340 | } | 343 | } |
344 | delete lp; | ||
341 | return TRUE; | 345 | 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 | |||
@@ -124,6 +124,6 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
124 | { | 124 | { |
125 | QMessageBox mb( tr("Mail not downloaded"), | 125 | QMessageBox mb( tr("Mail not downloaded"), |
126 | tr("The mail you have clicked \n" | 126 | tr("The mail you have clicked \n" |
127 | "has not been downloaded yet.\n " | 127 | "has not been downloaded yet.\n " |
128 | "Would you like to do it now ?"), | 128 | "Would you like to do it now ?"), |
129 | QMessageBox::Information, | 129 | QMessageBox::Information, |
@@ -131,9 +131,9 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
131 | QMessageBox::No | QMessageBox::Escape,0 ); | 131 | QMessageBox::No | QMessageBox::Escape,0 ); |
132 | 132 | ||
133 | result=mb.exec(); | 133 | result=mb.exec(); |
134 | 134 | ||
135 | if (result==QMessageBox::Yes) | 135 | if (result==QMessageBox::Yes) |
136 | { | 136 | { |
137 | emailClient->download(mail); | 137 | emailClient->download(mail); |
138 | } | 138 | } |
139 | } | 139 | } |
@@ -142,3 +142,3 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
142 | views->raiseWidget(readMail); | 142 | views->raiseWidget(readMail); |
143 | setCaption( tr( "Examine mail" ) ); | 143 | setCaption( tr( "Read Mail" ) ); |
144 | } | 144 | } |
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp index 2102ba7..da1226c 100644 --- a/noncore/unsupported/mailit/emailclient.cpp +++ b/noncore/unsupported/mailit/emailclient.cpp | |||
@@ -471,6 +471,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) | |||
471 | } | 471 | } |
472 | if (item->getMail()->files.count()>0) | 472 | // if (item->getMail()->files.count()>0) |
473 | { | 473 | // { |
474 | item->setPixmap(0, Resource::loadPixmap("mailit/attach")); | 474 | // item->setPixmap(0, Resource::loadPixmap("mailit/attach")); |
475 | } | 475 | // } |
476 | /*if (!newMail.downloaded) | 476 | /*if (!newMail.downloaded) |
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp index 59ccd90..39f693d 100644 --- a/noncore/unsupported/mailit/emailhandler.cpp +++ b/noncore/unsupported/mailit/emailhandler.cpp | |||
@@ -177,4 +177,6 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
177 | 177 | ||
178 | TextParser p(header, lineShift); | 178 | // TextParser p(header, lineShift); |
179 | 179 | TextParser * lp = new TextParser(header, lineShift); | |
180 | #define p (*lp) | ||
181 | |||
180 | if ((pos = p.find("FROM",':', 0, TRUE)) != -1) { | 182 | if ((pos = p.find("FROM",':', 0, TRUE)) != -1) { |
@@ -272,2 +274,3 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
272 | mail->bodyPlain = body; | 274 | mail->bodyPlain = body; |
275 | delete lp; | ||
273 | return mail; | 276 | return mail; |
@@ -340,2 +343,3 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai | |||
340 | } | 343 | } |
344 | delete lp; | ||
341 | return TRUE; | 345 | return TRUE; |
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp index a111241..f945a0f 100644 --- a/noncore/unsupported/mailit/mailitwindow.cpp +++ b/noncore/unsupported/mailit/mailitwindow.cpp | |||
@@ -124,6 +124,6 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
124 | { | 124 | { |
125 | QMessageBox mb( tr("Mail not downloaded"), | 125 | QMessageBox mb( tr("Mail not downloaded"), |
126 | tr("The mail you have clicked \n" | 126 | tr("The mail you have clicked \n" |
127 | "has not been downloaded yet.\n " | 127 | "has not been downloaded yet.\n " |
128 | "Would you like to do it now ?"), | 128 | "Would you like to do it now ?"), |
129 | QMessageBox::Information, | 129 | QMessageBox::Information, |
@@ -131,9 +131,9 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
131 | QMessageBox::No | QMessageBox::Escape,0 ); | 131 | QMessageBox::No | QMessageBox::Escape,0 ); |
132 | 132 | ||
133 | result=mb.exec(); | 133 | result=mb.exec(); |
134 | 134 | ||
135 | if (result==QMessageBox::Yes) | 135 | if (result==QMessageBox::Yes) |
136 | { | 136 | { |
137 | emailClient->download(mail); | 137 | emailClient->download(mail); |
138 | } | 138 | } |
139 | } | 139 | } |
@@ -142,3 +142,3 @@ void MailItWindow::viewMail(QListView *view, Email *mail) | |||
142 | views->raiseWidget(readMail); | 142 | views->raiseWidget(readMail); |
143 | setCaption( tr( "Examine mail" ) ); | 143 | setCaption( tr( "Read Mail" ) ); |
144 | } | 144 | } |