Goodbye KJanusWidget

Thiago Macieira thiago at kde.org
Sun Jun 4 10:29:30 BST 2006


Tobias Koenig wrote:
>although it's more to write we should remeber at Matthias' talk where he
>said "Code is written once, but read many times"

Definetely worth it. The parameter construction that you posted 
illustrates this need.

>So can I merge my local changes with current SVN trunk/kdelibs?

Just a few comments before you do:
1) kdialog.h includes QDialog. Please change that to QtGui/QDialog or 
QtGui/qdialog.h. The same applies to the other files:
	kpagemodel.h includes QAbstractItemModel. Please add the QtCore/ part.
	kpageview.h includes QAbstractItemView and QWidget. Those require the 
QtGui/ part.
	kpagewidgetmodel.h includes QIcon: QtGui/ missing.

2) NoDefault (KDialog::ButtonCode) has a value of 0x80000001. Is that the 
intended value? You'll be conflicting with the Help value (0x1).

3) ActionButtonStyle makes no sense. Should it be removed or moved to a 
private part of the class? Or is that one of the items for which docs are 
missing?

4) KDialog::button says "Normally you should not use this function". Why 
is it there, then?

5) incInitialSize <--- bad name. Maybe you should be verbose here.

6) KDialog::setMainWidget says "reimplemented from QDialog", but QDialog 
has no member called setMainWidget. Either the docs are misleading, or 
you may be expecting a behaviour that does not exist anymore.

7) KPageView has private functions rebuildGui, updateSelection and 
cleanupPages. Hint: move them to the Private class.

8) Technically, you're not supposed to use Q_PRIVATE_SLOT, but it's too 
convenient :-)

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech AS
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060604/24b31f2f/attachment.sig>


More information about the kde-core-devel mailing list