[Kopete-devel] Re: Recent KHTML/Qt changes cause crash in Kopete

Peter Kelly pmk at kde.org
Sun Mar 9 23:08:47 GMT 2003


On Mon, 10 Mar 2003, Peter Kelly wrote:

> A possible fix, if the document is null in some situations would be 
> something like the following:
> 
>   if (chatView->document().isNull()) {

That should of course be if (!chatView->document().isNull()), unless you 
want to guarantee a crash ;)

>     DOM::HTMLElement newNode =
>       chatView->document().createElement(QString::fromLatin1("div") );
>     newNode.setInnerHTML( resultHTML );
>     chatView->htmlDocument().body().appendChild( newNode );
>     if( !scrollPressed )
>       QTimer::singleShot( 1, this, SLOT( slotScrollView() ) );
>   }
>   else {
>     refreshView();
>   }

-- 
Peter Kelly
pmk at kde.org





More information about the kfm-devel mailing list