summaryrefslogtreecommitdiffstats
path: root/src/libraries/qmfclient/qmailmessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/qmfclient/qmailmessage.cpp')
-rw-r--r--src/libraries/qmfclient/qmailmessage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libraries/qmfclient/qmailmessage.cpp b/src/libraries/qmfclient/qmailmessage.cpp
index a04abc67..b6f16ed2 100644
--- a/src/libraries/qmfclient/qmailmessage.cpp
+++ b/src/libraries/qmfclient/qmailmessage.cpp
@@ -2569,13 +2569,13 @@ QByteArray QMailMessageContentType::type() const
*/
void QMailMessageContentType::setType(const QByteArray& type)
{
- if (type.isEmpty())
- {
+ if (type.isEmpty()) {
// Note - if there is a sub-type, setting type to null will destroy it
setContent(type);
- }
- else
- {
+ } else if (type.contains(';') || type.contains('/')) {
+ qWarning() << Q_FUNC_INFO << "wrong usage of setType(), consider using setSubType() or setParameter()" << type;
+
+ } else {
QByteArray content(type);
QByteArray secondaryType(subType());