[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: KDE/kdepim/libkdepim
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2007-05-29 14:22:34
Message-ID: 200705291622.38193.dfaure () klaralvdalens-datakonsult ! se
[Download RAW message or body]
On Tuesday 29 May 2007, Laurent Montel wrote:
> On mardi 29 mai 2007, David Faure wrote:
> > On Tuesday 29 May 2007, Laurent Montel wrote:
> > > +void KMeditor::Private::slotFindDialogDestroyed()
> > > {
> > > + //Be sure to delete it later.
> > > + findDialog->deleteLater();
> > > + findDialog = 0L;
> > > }
> >
> > findDialog->setAttribute(Qt::WA_DeleteOnClose) does the same without the
> > need for a slot.
>
> Are you sure that findDialog pointer is put to "null" ?
> I try to look at into qt source and didn't see that pointer value was put to
> null.
Ah, no, you are right. Delete on close is good for "create and forget" objects,
not for the case where you have a pointer that should be set to 0 to remember
that the dialog was deleted. Well, there's QPointer for that, but together with the
delete-on-close flag that might be a bit too much magic to people's taste :)
Do as you prefer.
--
David Faure, faure@kde.org, dfaure@klaralvdalens-datakonsult.se
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software solutions
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic