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

Michael Howell mhowell123 at gmail.com
Fri Nov 6 00:55:07 CET 2009


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.

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

Attached is a modified version that uses a QFuture. I pick QFuture for the 
aforementioned synchronization support.

Any comments?

-- 
Please don't send HTML-only mail (if you like, you can use multipart). If you 
forward messages, please clean off the garbage. Thanks! 
Michael Howell 
mhowell123 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwebwallet.h
Type: text/x-chdr
Size: 3184 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/webkit-devel/attachments/20091105/7537634c/attachment.h 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/webkit-devel/attachments/20091105/7537634c/attachment.sig 


More information about the WebKit-devel mailing list