Bug 282256 - kwebkitpart doesn't use kget as download manager from konqueror
Summary: kwebkitpart doesn't use kget as download manager from konqueror
Status: RESOLVED FIXED
Alias: None
Product: kwebkitpart
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: webkit-devel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-18 08:15 UTC by Stefano Crocco
Modified: 2012-07-15 16:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Crocco 2011-09-18 08:15:01 UTC
Version:           unspecified (using KDE 4.7.1) 
OS:                Linux

In konqueror, if I attempt to download a file from a page rendered by kwebkitpart by left-clicking the link, then choosing "save as..." from the dialog which appears, then kget isn't used as download manager for that file, even if konqueror is configured to do so (and indeed it does when using khtml). However, if I download the file using the "Save link as" context menu entry, KGet is correctly used even by kwebkit part.

Reproducible: Always

Steps to Reproduce:
After setting up KGet to be used as download manager from konqueror, open a web page with a file to download from konqueror and set the view mode to WebKit. Then left click on the file to download and choose "Save as..." from the dialog

Actual Results:  
The standard konqueror "Save as" dialog appears. KGet isn't used to download the file.

Expected Results:  
KGet is used as download manager
Comment 1 Dawit Alemayehu 2011-12-04 06:27:05 UTC
This happens because RMB "Save Link As" is handled by kwebkitpart where as the left click on a link is handled by kdewebkit which does not yet have support for download managers (read: kget). 

I will see what I can do about adding such support into kdewebkit before KDE 4.8 is released.
Comment 2 Dawit Alemayehu 2011-12-08 14:26:58 UTC
Git commit b86026cee23678fcba1d8f1ef3874ab1faddb546 by Dawit Alemayehu.
Committed on 08/12/2011 at 05:10.
Pushed by adawit into branch 'KDE/4.7'.

If a QObject property named "DownloadManagerExe" is specified in the
QNetworkReply object parameter of 'downloadResponse' or 'handleReply',
then attempt to use it to download the requested resource.

CCBUG: 282256

M  +12   -0    kdewebkit/kwebpage.cpp
M  +18   -1    kdewebkit/kwebpage.h

http://commits.kde.org/kdelibs/b86026cee23678fcba1d8f1ef3874ab1faddb546
Comment 3 Dawit Alemayehu 2011-12-08 14:45:21 UTC
Git commit d38adca1162da254d784d9e04dd12d197a4ced2a by Dawit Alemayehu.
Committed on 08/12/2011 at 15:43.
Pushed by adawit into branch '1.2'.

When handling unsupported content, use the download manager
if one is specified in Konqueror's settings.

BUG: 282256

M  +5    -0    src/webpage.cpp

http://commits.kde.org/kwebkitpart/d38adca1162da254d784d9e04dd12d197a4ced2a
Comment 4 Dawit Alemayehu 2011-12-08 14:45:53 UTC
Git commit 3d35a9e9583921f78d4c43b43534111c990dd382 by Dawit Alemayehu.
Committed on 08/12/2011 at 15:43.
Pushed by adawit into branch 'master'.

When handling unsupported content, use the download manager
if one is specified in Konqueror's settings.

BUG: 282256

(cherry picked from commit d38adca1162da254d784d9e04dd12d197a4ced2a)

M  +5    -0    src/webpage.cpp

http://commits.kde.org/kwebkitpart/3d35a9e9583921f78d4c43b43534111c990dd382
Comment 5 Dawit Alemayehu 2011-12-19 07:25:02 UTC
Git commit cbbb3c7dff553caad72b15becb961e8202a0ed65 by Dawit Alemayehu.
Committed on 19/12/2011 at 08:24.
Pushed by adawit into branch 'KDE/4.7'.

Make sure the suggested file name is shell quoted before being
passed to the download manager executable.

Example provided by Ze exposes this flaw. To see the issue click on
the Download zip link at

http://www.opensubtitles.org/en/subtitles/4433043/dream-house-pb

CCBUG:282256

M  +2    -1    kdewebkit/kwebpage.cpp

http://commits.kde.org/kdelibs/cbbb3c7dff553caad72b15becb961e8202a0ed65
Comment 6 Rex Dieter 2012-07-15 15:37:28 UTC
fyi, this commit to 1.2 branch breaks the build, as there's no checkForDownloadManager function on that branch (it landed in master as part of commit 4546f2af8d760db37d9de3e1e5cda46242adc6a4)
Comment 7 Dawit Alemayehu 2012-07-15 16:39:19 UTC
(In reply to comment #6)
> fyi, this commit to 1.2 branch breaks the build, as there's no
> checkForDownloadManager function on that branch (it landed in master as part
> of commit 4546f2af8d760db37d9de3e1e5cda46242adc6a4)

Fixed. Thanks for the heads up. I should have checked to make sure the build was okay after backporting that fix.