KConfigDialog crash and fix for it

Joris Guisson joris.guisson at gmail.com
Mon Oct 22 19:33:15 BST 2007


On 10/22/07, Aaron J. Seigo <aseigo at kde.org> wrote:
>
> On Monday 22 October 2007, Joris Guisson wrote:
> > Nobody interested ? I guess my patch must be fine then, shall I commit ?
>
> having a second QMap seems ugly and a bit wasteful. can you do something
> like:
>
> QMap<QWidget *, KConfigDialogManager *>::iterator it =
> d->managerForPage.begin();
>
> while (it != d->managerForPage.end()) {
>     if (it.value() == item->widget()) {
>         delete it.value();
>         d->managerForPage.erase(it);
>     }
>     ++it;
> }


That was my first approach and it failed miserably, you see the widget you
give to KConfigDialog, gets stuffed into a KVBox.

also, making removePage virtual isn't BC and seems a bit heavy handed. it
> uses
> a model internally, which does have a rowsRemoved signal ... though that's
> buried a few levels deep.
>
> perhaps KPageWidget should have a pageRemoved(KPageWidgetItem*) signal,
> which
> reacts to the rowsRemoved signal, which can then be passed up via
> KPageDialog
> as well ... that way one doesn't have to subclass to do special things on
> page removal (and remember to call the parent class' method along the way)
> and it can be used externally as well ...


thoughts?


Maybe that is a better approach. I will try that, and see how it goes.

Btw, didn't know binary compatibility was important at this point in time. I
can understand once 4.0 is out, but now ?

Joris,


--
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>
> KDE core developer sponsored by Trolltech
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071022/c311bc3a/attachment.htm>


More information about the kde-core-devel mailing list