[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: RE: short-lived modeless dialogs (Re: modeless KFileDialog)
From: David Faure <David.Faure () cramersystems ! com>
Date: 2000-01-27 14:30:54
[Download RAW message or body]
> On Fre, 28 Jan 2000, Sirtaj Singh Kang wrote:
>
> > 1. The dialog does not access any of its internal variables or
> > functions after the done signal is emitted (ie it doesn't care any
> > more that this is pointing to a deleted object).
>
> The "right" thing would be imho incorporating QGuardedPtr, so that any
> pointer to that dialog is automatically invalidated.
>
> Well, I tried once something like
>
> QGuardedPtr<FancyDlg> pointer;
>
> pointer = new FancyDlg(parent, name);
>
>
> the FancyDlg is modeless and gets somewhen closed. in the
> hideEvent() of
> that Dlg I wrote "close(true)". This destructs it.
>
> However the QGuardedPtr didn't notice the destruction. So
> something must gone wrong (anybody a clue?).
As was said in another post, that's because Qt doesn't destroy the dialog
at once, but later on. I think.
> However if we could get that somehow to work, it would be great.
I don't see why it helps. If the app didn't have the time to call
the methods it wanted in the dialog, it's too late anyway.
The fact that pointer == 0L doesn't help.
--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic