[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Is this a bug in kdelibs4 ?
From:       "Tomas Mecir" <mecirt () gmail ! com>
Date:       2006-06-23 12:12:14
Message-ID: 492258b10606230512w5d9389d9h7bca8077f5036c63 () mail ! gmail ! com
[Download RAW message or body]

Hi everyone,

I looked through the code of the KDialog in kdelibs4-snapshot, in an
attempt to locate my crash, and I succeeded. So I'd like to ask - is
the following to be considered a bug in kdelibs4 ? Because to me, it
seems that way.

Constructor of KDialog sets default buttons to Ok | Cancel.
This constructor also sets default button to Ok (setDefaultButton)- as
a pointer to the Ok button widget.
When you call setButtons to change buttons (or just to ensure that
you'll really have Ok|Cancal, as the Sort dialog is doing), the old
buttons are deleted and new ones created, BUT the default button
remains the same pointer.
As a result, unless you also call setDefaultButton in your code, you
will get a crash upon trying to display the widget (QDialog tries to
call setFocus on the default widget, but the pointer points to deleted
memory).

Soo ... is this a bug in KDialog, which should clear the default
button in the setButtons call ? And if so, how to best report ?
kdelibs-core-devel or bugzilla ?

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic