[WebKit-devel] RFC: API for KWebWallet...

Dawit A. adawit at kde.org
Fri Nov 6 02:07:14 CET 2009


On Thursday 05 November 2009 18:55:07 Michael Howell wrote:
> On Thursday 05 November 2009 15:59:28 Dawit A. wrote:
> > Hi all,
> >
> > Attached is the first take for a QtWebKit/KWallet integration class,
> > KWebWallet, I am currently working on. The functions present there are
> >  mostly documented, but some bits and pieces are current missing. Note
> > that there is no implementation of this class yet! This is only my
> > attempt to get the API worked out first...
> >
> > I have purposefully kept the API I created as simple as possible. You
> > call saveFormData, most likely from acceptNavigationRequest when the
> >  NavigationType is NavigationTypeFormResubmitted, to save the form data
> > and to restore it you would probably connect the
> > restoreFrameStateRequested QWebPage signal to the restoreFormData slot
> > from this class.
> >
> > However, the above is only my approach and I need feedback a what people
> >  want to get from this API...
> 
> Why not, instead of using a signal on the KWebWallet object, return a KJob
>  or a QFuture from the saveFormData, like, for example,
>  QNetworkAccessManager (I know, it actually returns a QReply...) and KIO
>  do. In fact, a QFuture would even eliminate the need for synchronous job
>  support, since QFuture takes care of that.

The QFuture is an excellent idea! I do not understand how a KJob would fit here 
at all though since we are going to directly talk to KWallet using its public 
interface much like khtml does. Regardless, I like the using the QFuture idea 
on many levels...

> Another comment: restoreFormData and setConfirmSaveFormDataRequest return
>  void, yet the documentation reports them returning "true if form data was
>  sucessfully restored."

The usual copy/paste problem. :)


More information about the WebKit-devel mailing list