[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [Bug 92412] If PGP/MIME encrypted messages are BCC'ed then except
From: Ingo "Klöcker" <kloecker () kde ! org>
Date: 2004-10-30 20:21:45
Message-ID: 20041030202145.22955.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=92412
kloecker kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From kloecker kde org 2004-10-30 22:21 -------
CVS commit by kloecker:
Fix PGP/MIME encrypting messages which are BCC'ed. The problem was that KMMessagePart \
contains a QByteArray which is explicitely shared. Therefore simply copying a \
KMMessagePart with the copy c'tor for getting a temporary copy isn't possible. \
Implementing and using a duplicate method fixes the problem.
BUG: 92412
M +9 -0 kmmsgpart.cpp 1.113
M +4 -0 kmmsgpart.h 1.42
M +2 -1 messagecomposer.cpp 1.36
--- kdepim/kmail/kmmsgpart.h #1.41:1.42
@ -23,4 +23,8 @ public:
void clear();
+ /** Obtains an independant copy (i.e. without explicitely shared data) of the
+ data contained in msgPart. Returns a reference to this message part. */
+ KMMessagePart & duplicate( const KMMessagePart & msgPart );
+
/** Get or set the message body */
QCString body(void) const;
--- kdepim/kmail/kmmsgpart.cpp #1.112:1.113
@ -81,4 +81,13 @ void KMMessagePart::clear()
//-----------------------------------------------------------------------------
+KMMessagePart & KMMessagePart::duplicate( const KMMessagePart & msgPart )
+{
+ // copy the data of msgPart
+ *this = msgPart;
+ // detach the explicitely shared QByteArray
+ mBody.detach();
+}
+
+//-----------------------------------------------------------------------------
int KMMessagePart::decodedSize(void) const
{
--- kdepim/kmail/messagecomposer.cpp #1.35:1.36
@ -960,5 +960,6 @ public:
void execute() {
- KMMessagePart tmpNewBodyPart = *mNewBodyPart;
+ KMMessagePart tmpNewBodyPart;
+ tmpNewBodyPart.duplicate( *mNewBodyPart );
// TODO: Async call
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic