[Development] Proposal: Allow smart pointers in newly created API's - was RE: The future of smart pointers in Qt API

Thiago Macieira thiago.macieira at intel.com
Mon Feb 17 20:59:10 CET 2020


On Monday, 17 February 2020 03:14:55 PST Karsten Heimrich wrote:
> Still this does not mean we should move on without rethinking the
> possibility of using std:: smart pointers in newly created API's; either in
> new modules and or to a given extent in existing ones. Thus I would like to
> propose the adaptation of our coding style and coding conventions to
> explicitly _allow_ the use of std:: smart pointers where we see fit.
> Hopefully in the long run this would also make it easier to transition
> current API's from owning raw pointers to std:: smart pointers.
> 
> Does this sound like a more reasonable approach?

The problem is that new API may still be interacting with QObject pointers. Do 
you propose using Daniel's classes for transferring ownership (reparenting) or 
indicating a non-owning transfer for those too?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list