KDialog + KPage* d-ptr cleanup and fixes

Tobias Koenig tokoe at kde.org
Sun Jun 24 11:42:03 BST 2007


On Sat, Jun 23, 2007 at 10:36:23AM +0200, Matthias Kretz wrote:
> On Saturday 23 June 2007, Tobias Koenig wrote:
Hi,

> > It adds two new ModelRoles which are required by KPageView to work
> > correctly. If you pass a normal QAbstractItemModel based model (e.g.
> > QStringListModel), KPageView wouldn't work at all, maybe even crash.
> > So passing a QAbstractItemModel here is against the design of the
> > KPageView, please don't commit this part of your change!
> 
> 1. Taking KPageModel as base class to implement your model makes 0 difference 
> compared to using QAbstractItemModel as inheriting KPageModel does not force 
> you to return something valid for the two new roles in data(), flags() and so 
> on.
Right, at least KPageModel gives a hint that these two roles are needed.
So if you change it to QAbstractItemModel, please add a bold reminder to
the apidocs that the model has to provide these two roles.

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/20070624/25321009/attachment.sig>


More information about the kde-core-devel mailing list