[PATCH] When is KHTMLView done with rendering?
David Faure
faure at kde.org
Thu Jun 17 15:12:38 BST 2004
On Thursday 17 June 2004 15:50, Jeroen Wijnhout wrote:
> On Thursday 17 June 2004 15:18, David Faure wrote:
> > Small nitpick: why not do the test if ( !m_url.encodedHtmlRef().isEmpty()
> > ) before actually connecting to the signal?
> > Then gotoAnchor() will only be called when we actually need to go to an
> > anchor, as one might expect.
>
> Done.
Actually I wonder if the test is even needed, since we already test for url.hasRef().
But it can't hurt to double-check :)
Another issue: is finishedLayout() called if aborting the loading of the page?
If it is, then ok (although the jumping might be strange when aborting).
If it's not, then we might keep a connect() to the view's finishedLayout() signal,
and end up being connected more than once. In this case it won't do much harm
I suppose (just going to the same anchor multiple times in a row), but generally
I find that dynamic connects/disconnects are a bit dangerous for this reason.
One approach would be to disconnect before connecting, to ensure we're only
connected once. Another approach would be to always connect (in the constructor),
and put back the check for whether there's a ref in the current url :/
--
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