[WebKit-devel] Reviewing kdewebkit

Andrea Diamantini adjam7 at gmail.com
Thu Nov 12 15:26:01 CET 2009


On Thursday 12 November 2009 05:10:53 you wrote:
> No, it is not forgotten. The function documentation states and I quote
> 
> "For example, you can call this function when you receive
> @ref QWebPage::downloadRequested signal to download the
> the request through KIO."
> 
> It does not say you can connect to this slot because obviously it is not a
> slot as you already stated. ;)  The documentation simply is attempting to
>  give you an an example of how you can use the said function, i.e. from
>  your own slot that connects to the said signal.
> 
> > 3.
> > I'm having some problems with KWebView signals.
> > Surely it's just me, but seeing for example the linkShiftClicked() signal
> > I ran to connect it to KWebPage::downloadRequest(). And I couldn't
> > because of parameters. :(
> 
> So what you actually want is a
> 
> public Q_SLOTS:
> 	void downloadRequest(const QUrl& url);
> 
> Well that can be added and made to simply call downloadRequest(...). Note
>  that KWebPage does not currently have any slots because its parent does
>  not have any and tries to model itself after the parent class. Remember it
>  is simply a convenience wrapper class, i.e. drop in replacement for the
>  parent.

What I was just noticing is that we have 2 signals:
- QWebPage::downloadRequested(const QNetworkRequest &)
- KWebView::linkShiftClicked(const KUrl &)
I think 99% of the users of this lib wanna connect them with the same slot 
(the "slotDownloadSomething"). These users have to implement 2 slots to 
connect with these signals and to launch there the KWebView::downloadRequest() 
implementation.
It just sounds me a bit "strange", "complicated". That's all.

-- 
Andrea Diamantini, adjam
GPG Fingerprint: 57DE 8E32 7D1A 0E16 AA52 59D8 84F9 3ECD DBF9 730F

rekonq project
WEB: http://rekonq.sourceforge.net
IRC: rekonq at freenode



More information about the WebKit-devel mailing list