equal
deleted
inserted
replaced
42 #define QMESSAGECONTENTCONTAINER_P_H |
42 #define QMESSAGECONTENTCONTAINER_P_H |
43 |
43 |
44 #include "qmessageglobal.h" |
44 #include "qmessageglobal.h" |
45 #include "qmessagecontentcontainer.h" |
45 #include "qmessagecontentcontainer.h" |
46 #include "qmessage.h" |
46 #include "qmessage.h" |
|
47 #include "messagingutil_p.h" |
47 |
48 |
48 #ifdef USE_QMF_IMPLEMENTATION |
49 #ifdef USE_QMF_IMPLEMENTATION |
49 #include "qmfhelpers_p.h" |
50 #include "qmfhelpers_p.h" |
50 #else |
51 #else |
51 #include "qmessage_p.h" |
52 #include "qmessage_p.h" |
353 if (!isMessage()) { |
354 if (!isMessage()) { |
354 qWarning() << "Unable to add child QMessageContentContainer. MAPI only supports single level nesting of containers."; |
355 qWarning() << "Unable to add child QMessageContentContainer. MAPI only supports single level nesting of containers."; |
355 return; |
356 return; |
356 } |
357 } |
357 #endif |
358 #endif |
358 container.d_ptr->_id = QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(_attachments.count()+1))); |
359 container.d_ptr->_id = QMessageContentContainerId(MessagingUtil::addIdPrefix(QString::number(_attachments.count()+1))); |
359 _attachments.append(container); |
360 _attachments.append(container); |
360 return container.d_ptr->_id; |
361 return container.d_ptr->_id; |
361 } |
362 } |
362 |
363 |
363 QMessageContentContainerId prependContent(QMessageContentContainer& container) |
364 QMessageContentContainerId prependContent(QMessageContentContainer& container) |
368 return; |
369 return; |
369 } |
370 } |
370 #endif |
371 #endif |
371 _attachments.prepend(container); |
372 _attachments.prepend(container); |
372 for (int i = 0; i < _attachments.count(); ++i) { |
373 for (int i = 0; i < _attachments.count(); ++i) { |
373 _attachments[i].d_ptr->_id = QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(i+1))); |
374 _attachments[i].d_ptr->_id = QMessageContentContainerId(MessagingUtil::addIdPrefix(QString::number(i+1))); |
374 } |
375 } |
375 return _attachments[0].d_ptr->_id; |
376 return _attachments[0].d_ptr->_id; |
376 } |
377 } |
377 |
378 |
378 QMessageContentContainerId bodyContentId() const |
379 QMessageContentContainerId bodyContentId() const |
379 { |
380 { |
380 return QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(0))); |
381 return QMessageContentContainerId(MessagingUtil::addIdPrefix(QString::number(0))); |
381 } |
382 } |
382 |
383 |
383 static QString attachmentFilename(const QMessageContentContainer& container) |
384 static QString attachmentFilename(const QMessageContentContainer& container) |
384 { |
385 { |
385 return container.d_ptr->_filename; |
386 return container.d_ptr->_filename; |