KDialog + KPage* d-ptr cleanup and fixes
Tobias Koenig
tokoe at kde.org
Sat Jun 23 03:20:18 BST 2007
On Sat, Jun 23, 2007 at 12:12:00AM +0200, Matthias Kretz wrote:
> Hi,
Hi Matthias,
> The first one is rather straightforward. It makes use of the d-pointer pattern
> used throughout Qt in order to be able to inherit the d-pointer in all
> derived classes (like KDialog -> KPageDialog -> KCMultiDialog ->
> KSettings::Dialog).
Looks good, no objections
> Patch 2 is three times as big and applies the same d-pointer pattern to
> KPageDialog, KPageModel -> KPageWidgetModel, KPageView -> KPageWidget.
> API changes:
> - KPageView::setModel()/::model() use a QAbstractItemModel* instead of
> KPageModel* now since otherwise you cannot use any of the Qt interview
> convenience classes with KPageView. KPageModel only adds two enum values to
> QAbstractItemModel.
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!
> - the KPageDialog ctor that takes a KPageWidget* now reparents the KPageWidget
> to this as it's impossible to create the KPageWidget with this as parent.
Ok
> - added setEnabled/isEnabled to KPageWidgetItem which enables/disables the
> entry in the tree/list and the widget
Ok
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/20070623/bc9372cd/attachment.sig>
More information about the kde-core-devel
mailing list