KPageWidget

Charles Samuels charles at kde.org
Mon Nov 27 08:34:47 GMT 2006


Hi Tobias,

Tobias Koenig wrote, on Monday 2006 November 27 12:29 am:
> On Sun, Nov 26, 2006 at 11:20:40PM -0800, Charles Samuels wrote:
> > When trying to call the first constructor with a KPageWidget, there is an
> > ambiguity (This is a rare case).
>
> Hmm, since the second one is protected an external instanciation of a
> KPageDialog should always use the first ctor. The second one is only
> used when you inherit from KPageDialog, in this case you just supply all
> the parameters from your implementation:
>
> MyDialog::MyDialog( QWidget *parent, Qt::WFlags flags )
>
>   : KPageDialog( new MyPageWidget, parent, flags )
>
> {
> }
>
> So I can't see any ambiguity...

Short example:

MyDialog::MyDialog()
	: KPageDialog(0)
{
}

I know, I know, the user "shouldn't" do this, and it's a rare case. It's that 
it's now our chance to get KDE perfect :)

>
> > the function:
> >     KPageWidget *pageWidget() const;
> >
> > Should probably not be const. There should probably be a const and
> > non-const version of that function.
>
> Why?
Well, to answer yours and Thiago's comment:
pageWidget()->parentWidget()->allSortsOfDamage()

I just don't think there's a reason to *not* make it 
constconst/unconstunconst. (There, I invent new terminology)

> > Or is this email off-topic because it's not about PDF readers?
>
> Yeah, right, you should at least mention that okular uses KPageDialog in
> its configuration dialog as well...

I bet Ligature does too.

Charles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061127/0542326f/attachment.sig>


More information about the kde-core-devel mailing list