Summary: | KMail does not accept to insert an URL (Copied from Chromium) into a message | ||
---|---|---|---|
Product: | [Applications] kmail2 | Reporter: | Raymond Wooninck <tittiatcoke> |
Component: | composereditor-ng | Assignee: | Laurent Montel <montel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kdebugs, kfunk, peter, stefan |
Priority: | NOR | ||
Version: | Git (master) | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdepim/d00b8d235befd5a41c583e0ed6ae0d7bfe505cae | Version Fixed In: | 15.08.1 |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 346175 | ||
Attachments: | Screenshot of kmail when trying to insert an URL |
Description
Raymond Wooninck
2015-04-19 18:55:37 UTC
CTRL+C -> CTRL+V ? it works fine here. it's in html mode ? dnd ? Hi Laurent, I am using ctrl-c and then ctrl-v to paste the url into the message. I get the dialog box asking me if I want to insert the url into the message or to attach it. I select to insert the url into the message and nothing happens. The attempts were in a text-only email. Switching on Rich Text, doesn't help. I looked through the options and now I noticed that if I paste if with Ctrl-Shift-V (Paste without formatting), I can insert the url as it should. Also the option "Paste as Quotation" works fine. Just the normal paste doesn't seem to do anything. Somehow it looks like that the issue might be with the dialog box which asks me if it should insert the url into the message or as an attachment. I do not get this dialog with the other options and there it works fine. What do you mean with dnd ? could you provide a screenshot about dialog box please ? I don't have it. dnd => drag and drop, you move url from firefox by example with mouse. (as dnd a file file dolphin for example) Created attachment 92179 [details]
Screenshot of kmail when trying to insert an URL
Hi Laurent, I have added a screenshot of the kmail window after I press Ctrl-V. You can see the two options that are being provided and after selecting the top one, nothing happens. I tried dnd, but this doesn't do anything. Maybe I am doing something wrong as that dragging the url into Kate also gives an error about a malformed url. But Ctrl-C, Ctrl-V is working there Hmm, I always use Chromium as the web browser and copy & paste doesn't work from here into KMail. If I take firefox however, then the URL is directly pasted into the message itself and without showing this dialog box. I tried pasting the Chromium link into kwrite, kate and vi, to see if there is anything wrong with it, but this seems all correct. Indeed kmail + chromium has some problem. I don't know why yet. Raymond, what versions are you using? Dragging URLs from Chromium into Konsole seems also broken, but that turns out to be a Qt5 bug: https://bugreports.qt.io/browse/QTBUG-47981 Hi Peter, I am using Qt 5.5.1 (git snapshots). I can copy an URL from Chromium easily to kate or any other program, except kmail. As you can see in the bugreport, Laurent was able to reproduce this. I don't think that this particular bug is related to an Qt bug I just updated from kMail 4.14 to 5.0.0 and experience the same problem with my standard browser Chromium 44.0.2403.89 Ubuntu 15.04 (64-bit). Neither drag and drop nor copy and paste works for URLs taken from Chromium. Just to be clear, this is a regression in kMail 5 and worked just fine in kMail 4.x. Same here with kmail2 5.0.1 and Chrome stable version 45.0.2454.85 (64-bit). Neither the CRTL-v nor the right-click paste option in the message body work. After looking through the referenced Qt bug report and through KMail's URL handling code I'm confident to say we should just close this as UPSTREAM bug. Code in KMail looks fine -- when Qt gives us invalid data there's nothing we can do. Upstream bug: https://bugreports.qt.io/browse/QTBUG-47981 @Laurent, please check. Maybe a work-around in KMail would be to just paste QMimeData::text() in case QUrl::toDisplayString on the individual URLs returns an empty string. (In reply to Kevin Funk from comment #13) > Upstream bug: https://bugreports.qt.io/browse/QTBUG-47981 This only talks about DnD, while this bug refers to Copy and Paste. Is there the same internal magic behind in Qt in both cases? (In reply to Kevin Funk from comment #14) Pasting QMimeData::text() as a last-resort fallback sounds like a robust solution... (In reply to Kevin Funk from comment #14) > Maybe a work-around in KMail would be to just paste QMimeData::text() in > case QUrl::toDisplayString on the individual URLs returns an empty string. I will investigate it. This bug is still on my todo-list :) Git commit d00b8d235befd5a41c583e0ed6ae0d7bfe505cae by Montel Laurent. Committed on 08/09/2015 at 19:57. Pushed by mlaurent into branch 'Applications/15.08'. Fix Bug 346370 - KMail does not accept to insert an URL (Copied from Chromium) into a message FIXED-IN: 15.08.1 It's mainly a workaround against a Qt bug https://bugreports.qt.io/browse/QTBUG-47981 M +13 -2 kmail/editor/kmcomposewin.cpp http://commits.kde.org/kdepim/d00b8d235befd5a41c583e0ed6ae0d7bfe505cae Great, thanks a lot! |