Adding new 'virtual' methods to KCalendarSystem

Oswald Buddenhagen ossi at kde.org
Sun Jan 10 09:12:55 GMT 2010


On Sun, Jan 10, 2010 at 01:01:40AM +0000, John Layt wrote:
> Is it OK to re-purpose the existing declared private classes by now
> deriving them from the base private, or would changing their class
> hierarchy break BC?  My thinking is this is safe.
> 
of course. as long as no user-compiled code (including private inline
code) can access it and the memory layout of the public class stays the
same, you are just fine.

> Will the Q_DECLARE_PRIVATE use in KFooDerived clash with the one in
> KFooBase due to the friend?
>
if it compiles then it is fine. ;)

> I'm thinking it is not even necessary in the base where I could use
> d_ptr directly without needing  a cast?
> 
yes, and some qt classes do that. but it's not particularly elegant.





More information about the kde-core-devel mailing list