KParts, widget() and multiple views in katepart

Christoph Cullmann cullmann at babylon2k.de
Fri Jul 21 23:50:49 BST 2006


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 ;)

>  
>
> I think this is wrong as it makes the documentation for KParts::widget()
> into a liar.  The solution is simple, katepart can call KParts::setWidget()
> on the KTextEditor::Document::activeView().  Unfortunately, this introduces
> a problem because KParts insists on handling the deletion of the part if
> the widget is deleted.
>
> So, my solution is to introduce a protected function/variable in KParts
> like 'handleWidgetDeletion' that setWidget() will honor.
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...


cu
Christoph




More information about the kde-core-devel mailing list