KAutoPointer: a new autoptr class for QPointer
Thiago Macieira
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
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090710/f274d85f/attachment.sig>
More information about the kde-core-devel
mailing list