equal
deleted
inserted
replaced
37 ** |
37 ** |
38 ** $QT_END_LICENSE$ |
38 ** $QT_END_LICENSE$ |
39 ** |
39 ** |
40 ****************************************************************************/ |
40 ****************************************************************************/ |
41 #include "qmessagecontentcontainerid.h" |
41 #include "qmessagecontentcontainerid.h" |
42 |
42 #include "qmfhelpers_p.h" |
43 #include <qmailmessage.h> |
43 #include <qmailmessage.h> |
44 |
44 |
45 QTM_BEGIN_NAMESPACE |
45 QTM_BEGIN_NAMESPACE |
46 |
46 |
47 class QMessageContentContainerIdPrivate |
47 class QMessageContentContainerIdPrivate |
113 } |
113 } |
114 |
114 |
115 QMessageContentContainerId::QMessageContentContainerId(const QString& id) |
115 QMessageContentContainerId::QMessageContentContainerId(const QString& id) |
116 : d_ptr(new QMessageContentContainerIdPrivate) |
116 : d_ptr(new QMessageContentContainerIdPrivate) |
117 { |
117 { |
118 QString input(id); |
118 QString input(QmfHelpers::stripIdentifierPrefix(id)); |
119 |
119 |
120 if (input.startsWith("body:")) { |
120 if (input.startsWith("body:")) { |
121 d_ptr->_body = true; |
121 d_ptr->_body = true; |
122 input = input.mid(5); |
122 input = input.mid(5); |
123 } |
123 } |
159 QString location(d_ptr->_location.toString(true)); |
159 QString location(d_ptr->_location.toString(true)); |
160 if (d_ptr->_body) { |
160 if (d_ptr->_body) { |
161 location.prepend("body:"); |
161 location.prepend("body:"); |
162 } |
162 } |
163 |
163 |
164 return location; |
164 return QmfHelpers::prefixIdentifier(location); |
165 } |
165 } |
166 |
166 |
167 bool QMessageContentContainerId::isValid() const |
167 bool QMessageContentContainerId::isValid() const |
168 { |
168 { |
169 // Either we have a valid part locator, or we indicate a message body |
169 // Either we have a valid part locator, or we indicate a message body |