summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/viewmail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mail2/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/viewmail.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/unsupported/mail2/viewmail.cpp b/noncore/unsupported/mail2/viewmail.cpp
index da6924d..0cfb6e5 100644
--- a/noncore/unsupported/mail2/viewmail.cpp
+++ b/noncore/unsupported/mail2/viewmail.cpp
@@ -38,49 +38,49 @@ ViewMail::ViewMail(IMAPResponseFETCH &mail, IMAPHandler *handler, QWidget *paren
"%5"
"<b>Date:</b> %6<hr>"
"<font face=fixed>%7</font>")
.arg(deHtml(mail.envelope().subject().isNull() ? tr("(no subject)")
: deHtml(mail.envelope().subject())))
.arg(deHtml(mail.envelope().from().toString().isNull() ? tr("(no from)")
: mail.envelope().from().toString()))
.arg(deHtml(mail.envelope().to().toString().isNull() ? tr("(no recipient)")
: mail.envelope().to().toString()))
.arg(mail.envelope().cc().toString().isNull() ? QString(0)
: tr("<b>Cc:</b> %1<br>").arg(deHtml(mail.envelope().cc().toString())))
.arg(mail.envelope().bcc().toString().isNull() ? QString(0)
: tr("<b>Bcc:</b> %1<br>").arg(deHtml(mail.envelope().bcc().toString())))
.arg(mail.envelope().mailDate().isNull() ? tr("(no date)")
: mail.envelope().mailDate())
.arg("%1");
connect(reply, SIGNAL(activated()), SLOT(slotReply()));
connect(forward, SIGNAL(activated()), SLOT(slotForward()));
attachments->setEnabled(_gotBody);
browser->setText(QString(_mailHtml).arg(tr("Getting mail body from server. Please wait...")));
_handler->iUid("FETCH", QString("%1 (BODY[1])").arg(mail.uid()));
- connect(_handler, SIGNAL(gotResponse(IMAPResponse &)), SLOT(slotIMAPUid(IMAPResponse &)));
+ connect(_handler, SIGNAL(gotResponse(IMAPResponse&)), SLOT(slotIMAPUid(IMAPResponse&)));
}
ViewMail::~ViewMail()
{
hide();
}
void ViewMail::hide()
{
QWidget::hide();
if (_inLoop) {
_inLoop = false;
qApp->exit_loop();
}
}
void ViewMail::exec()
{
show();
if (!_inLoop) {
_inLoop = true;
qApp->enter_loop();
@@ -158,41 +158,41 @@ void ViewMail::slotForward()
if (!_mail.envelope().bcc().toString().isNull())
ftext += QString("Bcc: %1\n")
.arg(_mail.envelope().bcc().toString());
if (!_mail.envelope().subject().isNull())
ftext += QString("Subject: %1\n")
.arg(_mail.envelope().subject());
ftext += QString("\n%1\n")
.arg(_mail.bodyPart(1).data());
ftext += QString("----- End forwarded message -----\n");
SendMail sendMail;
sendMail.setSubject("Fwd: " + _mail.envelope().subject());
sendMail.setMessage(ftext);
Composer composer(this, 0, true);
composer.setSendMail(sendMail);
composer.showMaximized();
composer.exec();
}
void ViewMail::slotIMAPUid(IMAPResponse &response)
{
- disconnect(_handler, SIGNAL(gotResponse(IMAPResponse &)), this, SLOT(slotIMAPUid(IMAPResponse &)));
+ disconnect(_handler, SIGNAL(gotResponse(IMAPResponse&)), this, SLOT(slotIMAPUid(IMAPResponse&)));
if (response.statusResponse().status() == IMAPResponseEnums::OK) {
QValueList<IMAPResponseBodyPart> bodyParts;
bodyParts.append(response.FETCH()[0].bodyPart(0));
_mail.setBodyParts(bodyParts);
browser->setText(QString(_mailHtml).arg(deHtml(response.FETCH()[0].bodyPart(0).data())));
// fillList(response.FETCH()[0].bodyStructure());
_gotBody = true;
} else {
QMessageBox::warning(this, tr("Error"), tr("<p>I was unable to retrieve the mail from the server. You can try again later or give up.</p>"), tr("Ok"));
}
}