KDE 4 namespaces

Martijn Klingens klingens at kde.org
Mon May 9 20:02:53 BST 2005


On Monday 09 May 2005 21:08, Frans Englich wrote:
> > >On the other hand, a KIO-namespaced class can't move to kdecore later
> > > (like KSycoca did), so we have to make sure to get it right from the
> > > start. Let's see what this would look like:
> >
> > We can, with some trickery :-)
> >
> > namespace KIO
> > {
> >   class NewClass
> >   {
> >   };
> > }
> >
> > /* the trick: */
> > typedef KIO::NewClass KNewClass;

And AFAICS it doesn't work at all with signal/slot connections, as those rely 
on the real namespace.

> FWIW; that's a case which is relatively easily detected and fixed with a
> porting script. The less that depends on _COMPAT the better, IMHO.

Porting scripts have their own problems though, see Coolo's experiences with 
qt3toqt4 in kdelibs for a good example :)

-- 
Martijn




More information about the kde-core-devel mailing list