equal
deleted
inserted
replaced
353 if (!isMessage()) { |
353 if (!isMessage()) { |
354 qWarning() << "Unable to add child QMessageContentContainer. MAPI only supports single level nesting of containers."; |
354 qWarning() << "Unable to add child QMessageContentContainer. MAPI only supports single level nesting of containers."; |
355 return; |
355 return; |
356 } |
356 } |
357 #endif |
357 #endif |
358 container.d_ptr->_id = QMessageContentContainerId(QString::number(_attachments.count()+1)); |
358 container.d_ptr->_id = QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(_attachments.count()+1))); |
359 _attachments.append(container); |
359 _attachments.append(container); |
360 return container.d_ptr->_id; |
360 return container.d_ptr->_id; |
361 } |
361 } |
362 |
362 |
363 QMessageContentContainerId prependContent(QMessageContentContainer& container) |
363 QMessageContentContainerId prependContent(QMessageContentContainer& container) |
368 return; |
368 return; |
369 } |
369 } |
370 #endif |
370 #endif |
371 _attachments.prepend(container); |
371 _attachments.prepend(container); |
372 for (int i = 0; i < _attachments.count(); ++i) { |
372 for (int i = 0; i < _attachments.count(); ++i) { |
373 _attachments[i].d_ptr->_id = QMessageContentContainerId(QString::number(i+1)); |
373 _attachments[i].d_ptr->_id = QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(i+1))); |
374 } |
374 } |
375 return _attachments[0].d_ptr->_id; |
375 return _attachments[0].d_ptr->_id; |
376 } |
376 } |
377 |
377 |
378 QMessageContentContainerId bodyContentId() const |
378 QMessageContentContainerId bodyContentId() const |
379 { |
379 { |
380 return QMessageContentContainerId(QString::number(0)); |
380 return QMessageContentContainerId(WinHelpers::addIdPrefix(QString::number(0))); |
381 } |
381 } |
382 |
382 |
383 static QString attachmentFilename(const QMessageContentContainer& container) |
383 static QString attachmentFilename(const QMessageContentContainer& container) |
384 { |
384 { |
385 return container.d_ptr->_filename; |
385 return container.d_ptr->_filename; |