diff options
| author | Pekka Vuorela <pvuorela@iki.fi> | 2025-12-04 11:30:44 +0200 |
|---|---|---|
| committer | Pekka Vuorela <pvuorela@iki.fi> | 2025-12-11 11:27:20 +0200 |
| commit | 15a73fae6aaffbedc287359fba119e57613a2ed1 (patch) | |
| tree | 20179c05f2a2ea3db0977f833cdd727291fa712b /examples/qtmail/browserwidget.cpp | |
| parent | 2b166ddec7422518c266e74a84491eb05ba16d09 (diff) | |
Rename QMailMessageMetadata::content as contentCategory
The related functionality was confusing when setContent() didn't
actually set any content but rather the type of it. Also there are
other setContent() methods around that actually set the content.
Then again calling this contentType() would have collided further
in the inheritance tree by method returning a QMailMessageContentType
which is referring to header fields. Thus switched this to a third
distinct name.
Old setter and getter names provided for backwards compatibility
which should work at least for the very basic cases of setting and
comparing type.
Change-Id: I4c54548f3c2c85096fde64b3221e233dd3feefa3
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: <matti.viljanen@kapsi.fi>
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
Diffstat (limited to 'examples/qtmail/browserwidget.cpp')
| -rw-r--r-- | examples/qtmail/browserwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/qtmail/browserwidget.cpp b/examples/qtmail/browserwidget.cpp index 64a0af8e..ab8ab82a 100644 --- a/examples/qtmail/browserwidget.cpp +++ b/examples/qtmail/browserwidget.cpp @@ -835,7 +835,8 @@ void BrowserWidget::displayHtml(const QMailMessage* mail) if (mail->partCount() > 0) { bodyText = renderMultipart(*mail); } else { - bodyText = (mail->content() == QMailMessage::PlainTextContent) ? formatText(mail->body().data()) : mail->body().data(); + bodyText = (mail->contentCategory() == QMailMessage::PlainTextContent) ? formatText(mail->body().data()) + : mail->body().data(); if (!mail->contentAvailable()) { QString trailer = @@ -1202,7 +1203,6 @@ QString BrowserWidget::handleReplies(const QString& txt) const QString BrowserWidget::buildParagraph(const QString& txt, const QString& prepend, bool preserveWs) const { Q_UNUSED(prepend); - QStringList out; QString input = encodeUrlAndMail( preserveWs ? txt : txt.simplified() ); if (preserveWs) |
