[Development] The future of smart pointers in Qt API

André Pönitz apoenitz at t-online.de
Wed Feb 12 19:59:58 CET 2020


On Wed, Feb 12, 2020 at 05:08:33PM +0100, Allan Sandfeld Jensen wrote:
> > Allowing _both_ I have not seen actively endorsed by anyone,
> > this only makes a messy incosnsistent API.
> 
> I would allow both. It is the only way to remain source
> compatible, while making it possible for those that wish to, to
> follow the so-called Core guidelines for C++.

I'll rather have a uniform API than to have latest bells and
whistles in some random places. It's like putting chromium
coating on the wheel covers of your trusty oxcart. Sure, one
can do that, but it's not exactly solving a problem.

As Volker already noticed, it's not the "odd" QObject ownership
model that cause problems in practice, if at all it's the few cases
where it is unclear whether it applies.

Having said that, there might be some middle ground. E.g. for
large subsystem like QtWebEngine that differ for valid technical
reasons from the core offering anyway, having mildly different
API style might be ok.

Andre'


More information about the Development mailing list