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

List:       kde-commits
Subject:    Re: kdelibs/kdeui
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-12-11 8:50:54
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 11 December 2002 07:43, John Firebaugh wrote:
> On Monday 09 December 2002 2:43, David Faure wrote:
> > CVS commit by faure:
> >
> > Ouch! KWidgetAction was quite broken. If the GUI was rebuilt, toolbars
> > being deleted and created (e.g. after KEditToolbar, but not only), the
> > widget was destroyed too, since it was a child of the toolbar!
> >
> > Implemented the solution suggested by Simon:
> > * added toolbarDestroyed() signal to KToolbar
> > * connected to it in KWidgetAction
> > * reparent out the widget (like unplug does) when the toolbar is getting
> > destroyed.
> 
> Hmm, I thought at least the KEditToolbar case used to work, because unplug got 
> called before the toolbar was destroyed. Did this change recently?

I don't know, but the code in kxmlguifactory says something like "if the container
is going to be destroyed, then we don't bother manually unplugging its actions,
to save time". (Right, Simon?)

> And is there a reason we can't just connect to QObject::destroyed()?

Yes - that one would happen too late, the child widgets are destroyed already
(QWidget::~QWidget destroys them).

- -- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE99vxu72KcVAmwbhARAvAfAJ4hrqUJD73YA6L8Qz/vnbzxP2m2jACgrRjU
pmuEccpz54PhCv/ff/zEyZc=
=P4MJ
-----END PGP SIGNATURE-----

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

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