[Development] Making QScopedPointer scoped (again)

Laszlo Papp lpapp at kde.org
Thu Sep 5 11:01:46 CEST 2013


On Wed, Sep 4, 2013 at 9:15 PM, Stephen Kelly <stephen.kelly at kdab.com>wrote:

> On Wednesday, September 04, 2013 19:48:53 Knoll Lars wrote:
> > Given that we have less then 3 weeks until feature freeze (1) or (3)
> sound
> > more attractive for 5.2.
>
> That's not relevant.
>
> QScopedPointer is not moved anywhere in Qt 5.2. No code depends on the
> patch.
> My revert should be approved and we should go with option 4:
>
> 4) We revert the change that added moving to QScopedPointer. When there is
> a
> need for QUniquePointer in the future, it is added. The new QUniquePointer
> shouldn't have the bug I pointed out previously regarding constness:
>
>  http://thread.gmane.org/gmane.comp.lib.qt.devel/12900/focus=12915
>
> Preferably it shouldn't have other bugs either, and it should be compared
> to
> std::unique_ptr during review.
>
> > I believe that c++11's unique_ptr is already available to most developers
> > using Qt, so in that case, it might make more sense to leave
> > QScopedPointer as in 5.1 (since an exact copy of that class is not
> > available in C++11), and refer people to unique_ptr for the other use
> > cases.
>
> Particularly as any downstream who is able to move a QScopedPointer (and
> therefore is using c++11) does have std::unique_ptr.
>
> So, to end the discussion, please +2 the patch:
>
>  https://codereview.qt-project.org/#change,64428
>

I also agree with this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130905/19fbe253/attachment.html>


More information about the Development mailing list