summaryrefslogtreecommitdiffstats
path: root/examples/qtmail/qmailviewer.cpp
diff options
context:
space:
mode:
authorPekka Vuorela <pvuorela@iki.fi>2025-12-04 11:30:44 +0200
committerPekka Vuorela <pvuorela@iki.fi>2025-12-11 11:27:20 +0200
commit15a73fae6aaffbedc287359fba119e57613a2ed1 (patch)
tree20179c05f2a2ea3db0977f833cdd727291fa712b /examples/qtmail/qmailviewer.cpp
parent2b166ddec7422518c266e74a84491eb05ba16d09 (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/qmailviewer.cpp')
-rw-r--r--examples/qtmail/qmailviewer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/qtmail/qmailviewer.cpp b/examples/qtmail/qmailviewer.cpp
index fddb4b93..ba8bdcf3 100644
--- a/examples/qtmail/qmailviewer.cpp
+++ b/examples/qtmail/qmailviewer.cpp
@@ -250,14 +250,14 @@ bool QMailViewerInterface::handleOutgoingMessages( const QMailMessageIdList &lis
*/
/*!
- \fn bool QMailViewerInterface::isSupported(QMailMessage::ContentType t, QMailViewerFactory::PresentationType pres) const
+ \fn bool QMailViewerInterface::isSupported(QMailMessage::ContentCategory t, QMailViewerFactory::PresentationType pres) const
Returns true if the viewer can present a message containing data of content type \a t, using the
presentation type \a pres.
*/
/*!
- \fn QList<QMailMessage::ContentType> QMailViewerInterface::types() const
+ \fn QList<QMailMessage::ContentCategory> QMailViewerInterface::types() const
Returns a list of the content types that can be presented by this viewer component.
*/
@@ -306,7 +306,7 @@ void QMailViewerInterface::setResource(const QUrl& name, QVariant value)
Returns a list of keys identifying classes that can display a message containing \a type content,
using the presentation type \a pres.
*/
-QStringList QMailViewerFactory::keys(QMailMessage::ContentType type, PresentationType pres)
+QStringList QMailViewerFactory::keys(QMailMessage::ContentCategory type, PresentationType pres)
{
QStringList in;
@@ -320,7 +320,7 @@ QStringList QMailViewerFactory::keys(QMailMessage::ContentType type, Presentatio
Returns the key identifying the first class found that can display message containing \a type content,
using the presentation type \a pres.
*/
-QString QMailViewerFactory::defaultKey(QMailMessage::ContentType type, PresentationType pres)
+QString QMailViewerFactory::defaultKey(QMailMessage::ContentCategory type, PresentationType pres)
{
QStringList list(QMailViewerFactory::keys(type, pres));
return (list.isEmpty() ? QString() : list.first());