[RFC] bug 70936 - crash while embedding a KPart

Lubos Lunak l.lunak at suse.cz
Wed Jan 21 09:53:28 GMT 2004


On Tuesday 20 of January 2004 21:09, Andras Mantia wrote:
> On Tuesday 20 January 2004 21:17, David Faure wrote:
> > Anyway, this (not using global namespace) prevents dynamic_cast'ing across 
> > dlopened objects, so the plan is to go for global namespace in the long
> > run  (i.e. conflicts when the same name is used for two different things, 
> > like you just experienced). So:
> > 
> > > - does somebody have an idea for a global solution?
> >
> > Use namespaces!
>
> So you mean that every KPart should use namespaces in order to be safe? If
> so, is this documented, recommended somewhere? If not, we should do it (and
> you may do a presentation on the next meeting ;-) ).

 I don't think it's documented anywhere, but searching once for such ugly bug 
caused by this counts as a good recommendation, doesn't it ;) ? We even used 
to have 'struct X' or 'class Key' in libkdecore some time ago.

 In fact we already have partial support for it already, just do something 
like "../admin/nmcheck libkdecore.la 'libkdecore.nmcheck' 
--allowweak='libkdecore_weak.nmcheck 
libqt-mt_weak.nmcheck ../dcop/libDCOP_weak.nmcheck'" in kdelibs/kdecore, if 
you don't use unsermake, you can even simply do 'make nmcheck' or use 
--enable-nmcheck to get it automatically. It's not quite done yet, but we 
can't enforce it before KDE4.0 anyway, so there's still some time. But for 
something as simple as 'nmcheck libcervisiapart.la libcervisia.nmcheck' it 
should work.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list