KParts, widget() and multiple views in katepart

Adam Treat treat at kde.org
Sat Jul 22 00:01:05 BST 2006


On Friday 21 July 2006 6:50 pm, Christoph Cullmann wrote:
> Am Samstag, 22. Juli 2006 00:42 schrieb Adam Treat:
> > Currently Katepart does not implement widget() when the part is a
> > ReadOnly.
>
> Guess you mixed that up, Kate Part does not implement it if the factory
> loads it explicit as KTextEditor::Document or KDocument::Document ;)

Oh? Line #63 in katefactory.cpp:    

bool bWantSingleView = ( classname == "KTextEditor::Editor" );

Unless the factory loads it explicitly as "Editor" it doesn't implement 
widget();

> Still the question is: What should katepart do if it is created as
> KDocument::Document by request? Should it turn of the deletion by itself?
> Otherwise still destroying the widget() would destroy any other view...

Yes, I think that is the idea.  If bWantSingleView is false, then katepart 
will handle destruction itself.

Adam




More information about the kde-core-devel mailing list