On Tuesday, September 03, 2013 10:41:35 Giuseppe D'Angelo wrote: > While I partially agree with the dreaded NIH syndrome, let me forward > the argument that "escaping the scope" is very explicit in the code:
If it shouldn't be possible, it doesn't matter how explicit it is. > The move assignment in particular doesn't require anything "new" -- it's > literally q.reset(p.take()). The first point in my mail was that if you are doing q.reset(p.take()), then you don't want QScopedPointer in the first place. You want std::unique_ptr instead. If you don't have c++11, then you would have to stick with q.reset(p.take()) anyway (and you should reconsider why you are using QScopedPointer there at all, if this is existing code). Thanks, -- Join us in October at Qt Developer Days 2013 - https://devdays.kdab.com Stephen Kelly <[email protected]> | Software Engineer KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
