From 08a9289cc7de448a941f6cc2cc8743882d999ae4 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 1 Dec 2024 19:13:08 +0100 Subject: [PATCH] fix: all use bodyPart instead of body --- src/m_email/EMailBasicGpgOpera.cpp | 33 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/m_email/EMailBasicGpgOpera.cpp b/src/m_email/EMailBasicGpgOpera.cpp index 2b3b503..707b1d0 100644 --- a/src/m_email/EMailBasicGpgOpera.cpp +++ b/src/m_email/EMailBasicGpgOpera.cpp @@ -129,16 +129,15 @@ auto EncryptPlainText(int channel, const QStringList& keys, auto root_part_boundary = vmime::body::generateRandomBoundaryString(); content_type_header_field->setBoundary(root_part_boundary); - auto root_body_part = vmime::make_shared(); + auto root_body_part = vmime::make_shared(); auto control_info_part = vmime::make_shared(); auto encrypted_data_part = vmime::make_shared(); - root_body_part->appendPart(control_info_part); - root_body_part->appendPart(encrypted_data_part); - msg->setBody(root_body_part); - - root_body_part->setPrologText( + root_body_part->getBody()->appendPart(control_info_part); + root_body_part->getBody()->appendPart(encrypted_data_part); + root_body_part->getBody()->setPrologText( "This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)"); + msg->setBody(root_body_part->getBody()); auto control_info_part_header = control_info_part->getHeader(); auto control_info_content_type_field = @@ -300,16 +299,15 @@ auto EncryptEMLData(int channel, const QStringList& keys, auto root_part_boundary = vmime::body::generateRandomBoundaryString(); content_type_header_field->setBoundary(root_part_boundary); - auto root_body_part = vmime::make_shared(); + auto root_body_part = vmime::make_shared(); auto control_info_part = vmime::make_shared(); auto encrypted_data_part = vmime::make_shared(); - root_body_part->appendPart(control_info_part); - root_body_part->appendPart(encrypted_data_part); - message->setBody(root_body_part); - - root_body_part->setPrologText( + root_body_part->getBody()->appendPart(control_info_part); + root_body_part->getBody()->appendPart(encrypted_data_part); + root_body_part->getBody()->setPrologText( "This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)"); + message->setBody(root_body_part->getBody()); auto control_info_part_header = control_info_part->getHeader(); auto control_info_content_type_field = @@ -672,18 +670,17 @@ auto SignEMLData(int channel, const QString& key, auto datetime_header_field = header->Date(); datetime_header_field->setValue(vmime::datetime::now()); - auto root_body_part = vmime::make_shared(); + auto root_body_part = vmime::make_shared(); auto container_part = vmime::make_shared(); auto mime_part = vmime::make_shared(); auto public_key_part = vmime::make_shared(); auto signature_part = vmime::make_shared(); - root_body_part->appendPart(container_part); - root_body_part->appendPart(signature_part); - message->setBody(root_body_part); - - root_body_part->setPrologText( + root_body_part->getBody()->appendPart(container_part); + root_body_part->getBody()->appendPart(signature_part); + root_body_part->getBody()->setPrologText( "This is an OpenPGP/MIME signed message (RFC 4880 and 3156)"); + message->setBody(root_body_part->getBody()); auto container_boundary = vmime::body::generateRandomBoundaryString(); auto container_part_header = container_part->getHeader();