Behavior change in KPageDialog/KPageWidgetItem

Tobias Koenig tokoe at kde.org
Mon Oct 1 01:35:32 BST 2007


On Sun, Sep 30, 2007 at 05:35:23PM -0400, Adam Treat wrote:
> On Sunday 30 September 2007, Tobias Koenig wrote:
Hi Adam,

> > You can set an icon for every PageItem, so what exactly is the problem?
> > The missing convenience method?
> 
> No, it it is just that KPageDialog behaves differently than it did in KDE3.5.
Yes, and that's intended!

> That convenience method just happens to have been the way to get at the old 
> functionality.
We can't provide such a method for KPageWidget, as the concept is
different from KDialogBase. In KDialogBase all pages were referenced by
a pseudo path string, in KPageWidget every page is referenced by its
PageItem.

> > I'm absolutely against adding application specific behaviour to a class
> > in kdelibs. That's exactly the reason why we ended up with such a beast
> > as KDialogBase in KDE 3.
> 
> I don't think this is application specific behavior.
If the standard behaviour is to show a page when you click on an item
and only in Kate you want this 'special' behaviour of opening/collapsing
a subtree, then it is an application specific behaviour...

> This was the behavior of the dialog in the old version in KDE 3.5.
Right, but KPageWidget is not KDialogBase from 3.5. KDialogBase was a
hugh, historically grown lump of code which was difficult to maintain
and to bugfix. Please don't let us do the same mistake again!

> And again, the current behavior is *very* odd if you make a KPageWidgetItem
> with QWidget=0.
That's correct. I've added a method 'setDefaultWidget' now to KPageView.
With this method you can set a widget which is shown whenever a item
without an own widget is selected.

> I'm just suggesting to 'fix' it so that it behaves like it did in KDE 3.5.
Objection. Your assumption is that you have a tree. However you can have
a list of items as well in KPageView. So what shall happen in this case
when you click on such an item? Not to forget that in KPageView the code
for selecting an item is separated from the code which shows the
according page. So you can't just opening/collaps a subtree in the
navigation view because you have only a pointer to QAbstractItemView
there. And please don't start discussing about casting the pointer if in
TreeMode or something similar...

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071001/27bab578/attachment.sig>


More information about the kde-core-devel mailing list