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

List:       kde-core-devel
Subject:    Re: KAutoPointer: a new autoptr class for QPointer
From:       Thiago Macieira <thiago () kde ! org>
Date:       2009-07-10 14:28:22
Message-ID: 200907101628.23013.thiago () kde ! org
[Download RAW message or body]


Ingo Klöcker wrote:
>Obviously, this situation arises if the user logs out while there is
>still some application showing a modal dialog. IMHO the user should not
>be obligated to close all modal dialogs if he wants to log out.

Yes, he should. If an application has unsaved data, it has to show a 
dialog asking confirmation. And if another modal dialog is in the front, he 
has to dismiss that dialog.

>> Which is completely unnecessary and we have numbers of leaks because
>> of this, as soon as the control flow becomes even slightly more
>> complicated. I would of course rather see this with the object simply
>> allocated on the stack, but using a scoped pointer here is still much
>> better. The same with classes, which should rather use scoped
>> pointers for objects they own rather than listing delete calls in the
>> dtor.
>
>I wholeheartedly agree with this. Unfortunately, there appears to be
>quite some aversion against using boost's pointer template classes (a
>trivial compile time dependency) in KDE, so using scoped pointers will
>not happen until Qt 4.6. I'd really love to know what technical reasons
>this aversion is based on.

Which of the boost pointer classes integrates with QPointer clear-when-
deleted mechanism?

By the way, does boost have binary compatibility guarantees in those 
classes?
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

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

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