KSharedPtr breakage

David Faure faure at kde.org
Sun Oct 23 22:21:55 BST 2005


On Sunday 23 October 2005 20:28, Frerich Raabe wrote:
> How about making KSycocaEntry (and all the stuff that inherits it - 
> KServiceType, KProtocolInfo et cetera) classes with value semantics, making 
> it do all the reference counting internally. So you'd have a 'KServiceType 
> KSycocaFactory::findServiceByName( const QString & )' function and so on.
> 
> Besides the nice side-effect that value semantics don't even trigger the whole 
> 'Who owns this thing?' thing, it would solve the problem with covariant 
> return types which you get when returning a SharedPtr<Foo> instead of a Foo*. 

Sounds very good to me.
I can give a hand for the implementation tomorrow if you want.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kde-core-devel mailing list