[Kde-bindings] korundum4 bugs

Stefano Crocco stefano.crocco at alice.it
Tue Feb 28 18:25:56 UTC 2012


Hello to everyone,

I think I've found some bugs in korundum4. Here they are

* korundum4 can't be build with ruby 1.9.3, because krubypluginfactory.cpp
  contains calls to Init_prelude, which is a function ruby 1.9.3 doesn't
  export anymore. I know this issue has already been reported as a bug
  (#287057), but given that it seems a serious bug and that there aren't any
  comments from the developers on the bug page, I wanted to make sure they
  are aware of the issue.

* the classes KEditListWidget, KEditListWidget::CustomEditor and
  KEditListBox::CustomEditor don't have bindings (using KDE::EditListWidget,
  KDE::EditListWidget::CustomEditor and KDE::EditListBox::CustomEditor all
  raise NameError), unless they have a different name which I missed

* the rbuic4 tool produces the wrong code if I have a KEditListBox with the
  buttons property set to only include Add and Remove buttons. What it
  produces is:
  @box.buttons = KDE::EditListBox::Add|KEditListBox::Remove
  where @box is the KDE::EditListBox instance. The problem, of course, is
  that KEditListBox::Remove should be KDE::EditListBox::Remove. The code for
  the add button, instead is correct

* there is a serious problem with rbuic4 and namespaces. Suppose I have two
  ui files, with the form name set to A::MyWidget and B::MyWidget (that is,
  the form names are the same but they're in different namespaces). The rb
  files produced by rbuic4 contain the two classes A::Ui::MyWidget and
  B::Ui::MyWidget, which is what one would expect. However, those classes
  inherit from a class defined at the beginning of the file which both have
  the same name: Ui_MyWidget. This means that if my program uses both these
  widgets, the two classes will overwrite each other and one of the two
  widgets won't work correctly. 

  While this may not be a true bug, it certainly is an unexpected behaviour
  from korundum4 (expecially since, as far as I know, this limitation isn't
  documented anywhere). Personally, yesterday I spent about half an hour
  trying to find out what was happening. I don't think it would be difficult
  to solve this issue: it would be enough to generate the name of the Ui_*
  class taking into account also the namespaces in which the widget will be
  (for example, A::MyWidget could correspond to a class named UI_A_MyWidget).

Thanks for the attention

Stefano


More information about the Kde-bindings mailing list