KAutoPointer: a new autoptr class for QPointer
thiago at kde.org
Fri Jul 10 15:28:22 BST 2009
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
>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-
By the way, does boost have binary compatibility guarantees in those
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel