summaryrefslogtreecommitdiffstats
path: root/examples/qtmail/plugins
diff options
context:
space:
mode:
authorPatrick Burke <patrick.burke@nokia.com>2011-01-07 13:48:22 +1000
committerPatrick Burke <patrick.burke@nokia.com>2011-01-07 13:48:22 +1000
commitd3d28260c9845606271a47e071d7476ff8aa34fa (patch)
tree42e81cf6ad43c1af02358cce44e84457219b14d4 /examples/qtmail/plugins
parent0289c68cd338a7a83e98a415f323f7a9adba19ad (diff)
Cleanup message subject for display only; database unchanged.
Alters all message.subject() calls for display to be message.subject().simplified() to strip tabs, duplicate spaces, etc.
Diffstat (limited to 'examples/qtmail/plugins')
-rw-r--r--examples/qtmail/plugins/composers/email/emailcomposer.cpp12
-rw-r--r--examples/qtmail/plugins/viewers/generic/browserwidget.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/qtmail/plugins/composers/email/emailcomposer.cpp b/examples/qtmail/plugins/composers/email/emailcomposer.cpp
index 0b0b384a..2b8d83e3 100644
--- a/examples/qtmail/plugins/composers/email/emailcomposer.cpp
+++ b/examples/qtmail/plugins/composers/email/emailcomposer.cpp
@@ -750,7 +750,7 @@ void EmailComposerInterface::setDetails(const QMailMessage& mail)
m_recipientListWidget->setRecipients(Bcc,QMailAddress::toStringList(mail.bcc()));
if ((mail.subject() != placeholder))
- m_subjectEdit->setText(mail.subject());
+ m_subjectEdit->setText(mail.subject().simplified());
}
bool EmailComposerInterface::isEmpty() const
@@ -1059,18 +1059,18 @@ void EmailComposerInterface::respond(QMailMessage::ResponseType type, const QMai
if ((subject.left(fwdIndicator.length() + 1) == (fwdIndicator.toLower() + ":")) ||
(subject.left(shortFwdIndicator.length() + 1) == (shortFwdIndicator.toLower() + ":"))) {
- subjectText = source.subject();
+ subjectText = source.subject().simplified();
} else {
- subjectText = fwdIndicator + ": " + source.subject();
+ subjectText = fwdIndicator + ": " + source.subject().simplified();
}
} else {
// Maintain the same ID in case we need part locations
mail.setId(source.id());
if (subject.left(replyIndicator.length() + 1) == (replyIndicator.toLower() + ":")) {
- subjectText = source.subject();
+ subjectText = source.subject().simplified();
} else {
- subjectText = replyIndicator + ": " + source.subject();
+ subjectText = replyIndicator + ": " + source.subject().simplified();
}
QMailAddress replyAddress(source.replyTo());
@@ -1094,7 +1094,7 @@ void EmailComposerInterface::respond(QMailMessage::ResponseType type, const QMai
forwardBlock += "Date: " + source.date().toString() + '\n';
forwardBlock += "From: " + source.from().toString() + '\n';
forwardBlock += "To: " + QMailAddress::toStringList(source.to()).join(QLatin1String(", ")) + '\n';
- forwardBlock += "Subject: " + source.subject() + '\n';
+ forwardBlock += "Subject: " + source.subject().simplified() + '\n';
QMailAccount originAccount(source.parentAccountId());
bool viaReference((originAccount.status() & QMailAccount::CanReferenceExternalData) &&
diff --git a/examples/qtmail/plugins/viewers/generic/browserwidget.cpp b/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
index a11c1d73..b0753af5 100644
--- a/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
+++ b/examples/qtmail/plugins/viewers/generic/browserwidget.cpp
@@ -607,7 +607,7 @@ void BrowserWidget::displayPlainText(const QMailMessage* mail)
QString text;
if ((mail->messageType() != QMailMessage::Sms) && (mail->messageType() != QMailMessage::Instant))
- text += tr("Subject") + QLatin1String(": ") + mail->subject() + '\n';
+ text += tr("Subject") + QLatin1String(": ") + mail->subject().simplified() + '\n';
QMailAddress fromAddress(mail->from());
if (!fromAddress.isNull())