Bug 368378

Summary: Regression in kMail 5.3.x: Drag and drop of attachments from a received mail into the composer does not work any more
Product: [Applications] kmail2 Reporter: Gunter Ohrner <kdebugs>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: a.skembris, gtwilliams, montel
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.4.0

Description Gunter Ohrner 2016-09-07 09:22:34 UTC
Note: I'm using the plain text composer, just in case this makes a difference.

In previous versions, it was possible to drag and drop attachments from any mail into a new composer window.

This does not work any more for me with kMail 5.3.x - instead of adding the dragged attachment, text similar to the following is pasted into the editor window if I drop the attachment:

attachment:2?place=header

or

attachment:2?place=body

depending on if a drag from the mails header area or body area.

Copy/paste of attachments using the context menu still works as a workaround.

Reproducible: Always
Comment 1 Laurent Montel 2016-09-07 10:34:21 UTC
know bug.
In investigation
Comment 2 Angelos Skembris 2016-09-11 18:01:31 UTC
Don't know if it's related, but dragging and dropping files into a composer window does not result in creating an attachment anymore for me. Instead, a URL pointing to the file is created, like this:

file:///home/User/Documents/filename.ext

If I attach the file using the dialog window and then drag and drop to a file to the attachments' panel, files are added as attachments as usual. 

Using KMail 5.3 from the tumbleweed repos.

Copy / paste using the context menu does not work in this case, I still get a URL.

If it's not the same bug then I can create a new entry in bugzilla.
Comment 3 Laurent Montel 2016-09-30 15:43:32 UTC
(In reply to Angelos Skembris from comment #2)
> Don't know if it's related, but dragging and dropping files into a composer
> window does not result in creating an attachment anymore for me. Instead, a
> URL pointing to the file is created, like this:
> 
> file:///home/User/Documents/filename.ext

it works fine here.

> If I attach the file using the dialog window and then drag and drop to a
> file to the attachments' panel, files are added as attachments as usual. 
> 
> Using KMail 5.3 from the tumbleweed repos.
> 
> Copy / paste using the context menu does not work in this case, I still get
> a URL.
> 
> If it's not the same bug then I can create a new entry in bugzilla.

you dnd from dolphin to composer ?
Comment 4 Angelos Skembris 2016-10-01 19:03:50 UTC
(In reply to Laurent Montel from comment #3)
> (In reply to Angelos Skembris from comment #2)
> > Don't know if it's related, but dragging and dropping files into a composer
> > window does not result in creating an attachment anymore for me. Instead, a
> > URL pointing to the file is created, like this:
> > 
> > file:///home/User/Documents/filename.ext
> 
> it works fine here.
> 
> > If I attach the file using the dialog window and then drag and drop to a
> > file to the attachments' panel, files are added as attachments as usual. 
> > 
> > Using KMail 5.3 from the tumbleweed repos.
> > 
> > Copy / paste using the context menu does not work in this case, I still get
> > a URL.
> > 
> > If it's not the same bug then I can create a new entry in bugzilla.
> 
> you dnd from dolphin to composer ?

Hi, 

Yeah, I dragged from dolphin to the composer window.

However, after the last update to dolphin 16.08.1 and frameworks 5.26 it seems to be working again. The changelog for KIO seems to have a few fixes that could be related, but I am not sure which one actually did the trick. There was also a fix for KIO in kmailtransport which could be the one.
Comment 5 Gunter Ohrner 2016-10-01 23:18:37 UTC
DnD of attachments from other mails does not work yet with my kMail version from KDE Neon - does this work for you? What KDE packages / versions are you using (or did you compile from source)?
Comment 6 Laurent Montel 2016-10-02 05:35:35 UTC
(In reply to Gunter Ohrner from comment #5)
> DnD of attachments from other mails does not work yet with my kMail version
> from KDE Neon - does this work for you? What KDE packages / versions are you
> using (or did you compile from source)?

you spoke about a other bug.
we spoke about dnd from dolphin to composer
not messageviewer->composer which doesn"t work yet
Comment 7 Laurent Montel 2016-11-08 20:13:25 UTC
Git commit 42a5c00667e6440fcf3879a1dfdc9f31088f78d2 by Montel Laurent.
Committed on 08/11/2016 at 20:12.
Pushed by mlaurent into branch 'master'.

Fix Bug 366652 - Drag and drop attachments in Kmail has stopped working

Fix Bug 368378 - Regression in kMail 5.3.x: Drag and drop of attachments from a received mail into the composer does not work any more

FIXED-IN: 5.4.0
Related: bug 366652

M  +2    -44   messageviewer/src/viewer/viewer_p.cpp
M  +0    -3    messageviewer/src/viewer/viewer_p.h
M  +45   -32   messageviewer/src/viewer/webengine/mailwebengineview.cpp
M  +3    -4    messageviewer/src/viewer/webengine/mailwebengineview.h
M  +1    -24   webengineviewer/src/webengineview.cpp
M  +1    -5    webengineviewer/src/webengineview.h

http://commits.kde.org/messagelib/42a5c00667e6440fcf3879a1dfdc9f31088f78d2