From kde-core-devel Sun Oct 25 23:44:07 2009 From: "Dawit A." Date: Sun, 25 Oct 2009 23:44:07 +0000 To: kde-core-devel Subject: Re: kdewebkit moved to kdereview Message-Id: <200910251944.07808.adawit () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125651434302942 On Sunday 25 October 2009 18:57:49 Sebastian Kügler wrote: > On Sunday 25 October 2009 22:40:47 Urs Wolfer wrote: > > On Sunday 25 October 2009 22:05:08 Sebastian Kügler wrote: > > > On Sunday 25 October 2009 20:02:51 Urs Wolfer wrote: > > > > I have just moved the kdewebkit lib from > > > > playground/libs/webkitkde/kdewebkit into kdereview. It's the KDE > > > > integration part of QtWebKit which is used directly in many apps and > > > > libs already (...which does not include the WebKit KPart). Any KDE > > > > app is supposed to move to this integration lib when it is in kdelibs > > > > (plans are to move it to kdelibs/kdewebkit). > > > > > > Could you briefly explain what features this brings? That might make it > > > easier for people to understand why it's needed ... > > > > Sure. The main point is for sure the integration of KIO. Without > > kdewebkit, any app which is using QWeb* classes does network > > interactions without KDE technologies. Other points are for example: > > * using KDE icons in context menu > > * using KDE plugins (for example nsplugins flash) > > * KDE dialogs for javascript dialogs (alert, file picker, ..) > > Great stuff. :) One thing I've been asking myself is if it all works in the > same way for QGraphicsWebView (the canvas based QGraphicsWidget). Are you > planning to add password saving / kwallet integration as well? Yes, that is planned ones Qt 4.6... Since this is hackers/coders mailing list, here is a simple example that attempts to make Urs' explanation above crystal clear. Without kdewebkit here is what you would have to do to integrate QtWebKit components with KDE: QWebView *view = new QWebView(parent); // KIO integration... KIO::Integration::AccessManager *mgr = new KIO::Integration::AccessManager(view); // CookieJar integration... KIO::Integration::CookieJar *cookiejar = new KIO::Integration::CookieJar; mgr->setCookieJar(cookieJar); // KDE kparts integration for handling html tags such as . KWebPluginFactory *factory = new KWebPluginFactory(this); view->page()->setNetworkAccessManager(mgr); view->page()->setPluginFactory(factory); With kdewebkit all the above stuff becomes... KWebView *view = new KWebView(parent); In addition you get features such as KDE dialog integration for prompts for free which you would otherwise have to implement yourself.