[Knode-devel] Re: [Kde-pim] [PATCH] Fix header colorization action of knode's scoring

Ingo Klöcker kloecker at kde.org
Wed Dec 31 00:46:59 CET 2003


On Tuesday 30 December 2003 18:30, Volker Krause wrote:
> Hi,
>
> the attached patches for libkdenetwork and knode fixes the "Colorize
> Header" action of knode's scoring.
>
> The knode patch reverts the last commit of knscoring.h which changed
> the signature of a virtual method (canColors()) by adding a const and
> thus the implementation of the parent class was used, which always
> returns false.

Hmm, it would be better if you added a const to the method in the parent 
class. After all this method should be const because it doesn't change 
anything. And remember, BC is no issue. So changing the interface of 
KScoring is no problem.

> The libkdenetwork patch fixes the widget id's in the action widget
> stack in the scoring editor. For some reason the id of the label
> "Select an action:" is set to 3 here instead of 0, leading to a
> conflict with the color combobox and thus some weird results when you
> select an action. Setting it to 0 explicitly fixes this.
> Bug #62305 describes a similiar problem, but I'm not sure if it is
> really fixed by this (I couldn't reproduce it exactly).

It's always better to let Qt find a suitable id for a widget. This id is 
returned by QWidgetStack::addWidget(...) and it should be stored if 
it's needed later. Explicitely specifying an id will just lead to 
problems (the id has to be unique because else Qt will simply use 
another id -> same problem as now) and should be avoided at all cost.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://mail.kde.org/pipermail/knode-devel/attachments/20031231/a1427866/attachment.pgp


More information about the Knode-devel mailing list