[Kde-bindings] Bug in rbuic: any class/module starting wih K gets prefixed with KDE::

Riyad Preukschas riyad at informatik.uni-bremen.de
Thu Dec 3 14:02:47 UTC 2009


On Thursday, 3. December 2009 14:07:34 Arno Rehn wrote:
> On Thursday 03 December 2009 01:02:05 Riyad Preukschas wrote:
> > Hi,
> > 
> > I have found a few issues in rbuic mostly regarding prefixing KDE classes
> >  with "KDE::":
> > 
> > *Any* custom widget used in a .ui-file with a class name that starts with a
> >  K gets converted to KDE:: even those that are not part of the KDE
> >  bindings. Try something like Kfoo::Bar::BazWidget in QtDesigner which gets
> >  converted to KDE::foo::Bar::BazWidget by rbuic even if Kfoo is your own
> >  non-KDE module.
> > 
> > I don't know whether this is easily fixable or this is intended and just
> >  not well documented. My approach would be to only KDE-prefix it if there
> >  is a constant definition in the KDE module for it otherwise leave it as
> >  is.
> I see a few options here:
> 1. Only convert classes starting with 'K' and another capital letter to 
> KDE::Foo (like KFoo -> KDE::Foo, but Kfoo will stay Kfoo)
> 2. Keep a list of kde classes in rbuic (probably very ugly).
> 3. Dynamically try to load smokekde and look if the class is actually part of 
> KDE. This would work for sure and would also be easily maintainable, now that 
> the init_smoke functions are extern "C". I guess it's not the fastest 
> solution, though.

1. I think is the best proposal. Only prefix classes starting with 2 capital letters and leave the other ones.
2. would be too cumbersome.
3. I don't know about the amount of work that would produce, but if lading the bindings was not necessary until now then going with 1. would solve the problem much easier.


Regards,
	Riyad  Preukschas



More information about the Kde-bindings mailing list