[patch] fix dnd into khtmlimagepart inside frames
David Faure
faure at kde.org
Tue Feb 10 09:38:12 GMT 2004
On Tuesday 10 February 2004 04:29, Leo Savernik wrote:
> Hello,
>
> A year ago I implemented dropping urls onto khtmlimageparts. Now I noticed
> that this wouldn't work for khtmlimageparts which are parts of a frameset.
> The attached patch fixes it.
>
> However, it resorts to much hackery to find the parent khtmlview to forward
> the dnd events to. I don't know a better way. Any better ideas? Otherwise
> I'll commit this fix.
You're walking up the widget hierarchy - why not walk up the QObject hierarchy
(of the parts)?
The parent() of "this" (the HTMLImagePart) should be the KHTMLPart that is the frameset.
(use dynamic_cast, of course :-)
(see KHTMLPart::parentPart() for inspiration)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kfm-devel
mailing list