Bug 287779 - Copy Email then Paste As Attachment does not work as expected
Summary: Copy Email then Paste As Attachment does not work as expected
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: Git (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-28 18:25 UTC by Jonathan Marten
Modified: 2011-11-30 11:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Marten 2011-11-28 18:25:42 UTC
Version:           Git (master) (using Devel) 
OS:                Linux

Sometimes the user may wish to attach an existing email as an attachment in the composer (but not by using Forward -> As attachment, e.g. if it is wanted in reply to an existing message).  One logical way to do this would be to select the message to be attached, "Edit - Copy Email", go to the composer, then "Edit - Paste as Attachment".

If this is done, what happens is that the GUI becomes unresponsive and the kmail process takes 100% CPU.  What it is doing is trying to create a zip attachment of the entire user's documents directory, the only way out of this is either to wait or to kill the kmail process.


Reproducible: Always

Steps to Reproduce:
Select an existing message in the message list, do "Edit - Copy Email".
Open a composer window, do "Edit - Paste as Attachment".


Actual Results:  
The GUI becomes unresponsive, the disc starts churning, KMail takes 100% CPU.


Expected Results:  
The message is pasted as an attachment.


Messages displayed on stderr (this is the start of a very long transcript which lists the entire contents of the documents directory):

kmail2(6514) Message::AttachmentControllerBase::addAttachment: Creating attachment from folder
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::compressFolder: starting compression
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::compressFolder: writing root directory :  ""
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::addEntity: -1 Attachment size :  33
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::addEntity: adding directory  "KookaGallery" to zip
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::addEntity: -1 Attachment size :  79
kmail2(6514)/libkdepim MessageCore::AttachmentFromFolderJob::Private::addEntity: adding directory  "119110" to zip
Comment 1 Laurent Montel 2011-11-30 07:47:41 UTC
"One logical way to do this would be to select
the message to be attached, "Edit - Copy Email"

Where is the "Edit -> copy email" ?
Right button in message view ?

in editor ?
Comment 2 Jonathan Marten 2011-11-30 08:45:43 UTC
From the main KMail window, menu bar, "Edit", "Copy Email"
Comment 3 Jonathan Marten 2011-11-30 08:57:36 UTC
Confirmed that one way of achieving this function is to drag a message from the message list and drop it on the composer, this works as expected.
Comment 4 Laurent Montel 2011-11-30 10:54:38 UTC
I confirm bug.
And confirm that dnd works.
Will look at.
Comment 5 Laurent Montel 2011-11-30 11:51:05 UTC
Git commit 38d7a7d512876769a50f07e868a064f990fe17d0 by Montel Laurent.
Committed on 30/11/2011 at 12:49.
Pushed by mlaurent into branch 'master'.

Fix Bug 287779 - Copy Email then Paste As Attachment does not work as expected

BUG: 287779
FIXED-IN: 4.7.4

M  +1    -37   kmail/kmcomposereditor.cpp
M  +0    -3    kmail/kmcomposereditor.h
M  +50   -1    kmail/kmcomposewin.cpp
M  +1    -0    kmail/kmcomposewin.h

http://commits.kde.org/kdepim/38d7a7d512876769a50f07e868a064f990fe17d0
Comment 6 Laurent Montel 2011-11-30 11:53:07 UTC
Git commit a1db0c805784d248c7734d88482e72239b017780 by Montel Laurent.
Committed on 30/11/2011 at 12:49.
Pushed by mlaurent into branch 'KDE/4.7'.

Fix Bug 287779 - Copy Email then Paste As Attachment does not work as expected

BUG: 287779
FIXED-IN: 4.7.4
(cherry picked from commit 38d7a7d512876769a50f07e868a064f990fe17d0)

Conflicts:

	kmail/kmcomposereditor.cpp
	kmail/kmcomposereditor.h
	kmail/kmcomposewin.h

M  +1    -37   kmail/kmcomposereditor.cpp
M  +2    -5    kmail/kmcomposereditor.h
M  +50   -1    kmail/kmcomposewin.cpp
M  +1    -0    kmail/kmcomposewin.h

http://commits.kde.org/kdepim/a1db0c805784d248c7734d88482e72239b017780