Workaround in WebView...

Will Stephenson wstephenson at kde.org
Mon Mar 22 10:46:00 CET 2010


On Monday 22 March 2010 10:37:08 Marco Martin wrote:
> On Monday 22 March 2010, Alexis Ménard wrote:
> > Hello,
> > 
> > 
> > May i know where was the crash? Because i'm sure the workaround is not
> > needed anymore...
> > 
> > QVariant WebView::itemChange(GraphicsItemChange change, const QVariant
> > &value) {
> > 
> >     if (change == QGraphicsItem::ItemSceneHasChanged) {
> >     
> >         //FIXME: QWebPage _requires_ a QWidget view to not crash in
> > 
> > places such as
> > 
> >         // WebCore::PopupMenu::show() due to
> > 
> > hostWindow()->platformPageClient() == NULL
> > 
> >         // because QWebPage::d->client is NULL
> >         d->webView->page()->setView(viewFor(this));
> >     
> >     }
> >     return QGraphicsWidget::itemChange(change, value);
> > 
> > }
> > 
> > Thank you....
> 
> iirc the crash was opening a combobox in a webpage.
> right now this workaround causes many other crashes with a quite random
> behaviour, and one for which Amarok is being beaten quite a lot lately:
> https://bugs.kde.org/show_bug.cgi?id=227639

And you'll notice that Amarok just workarounded this bug by delaying the 
QWebView instantiation from the applet ctor to the applet's init() function, 
which I presume is then after the 'QWidget view' is setup.

Will


More information about the Plasma-devel mailing list