[Development] Qt 5 types under consideration for deprecation / removal in Qt 6

Mutz, Marc marc at kdab.com
Tue Jun 18 09:43:29 CEST 2019


On 2019-06-18 08:18, Alberto Mardegan wrote:
> On 05/06/19 01:39, Kevin Kofler wrote:
>> Mutz, Marc via Development wrote:
>> 
>>> and produces surprises such as
>>> https://codereview.qt-project.org/gitweb?p=qt%2Fqtbase.git;a=commit;h=96dc9a19ae11ca140d681f0e2605b5f4b953e581
>> 
>> My existing QSharedDataPointer code always checks truth with
>> if (d.constData()) and never if (d).
> 
> Adding a const bool operator to QSharedDataPointer would solve the
> problem, wouldn't it?

And (silently) break code that relies on the current behaviour, yes.

These subtle issues are why, as with QList, I'd just leave it as-is and 
deprecate it. But you guys think that's wrong, so I've started 
https://codereview.qt-project.org/q/topic:%22QExplicitlySharedDataPointer-deep-const%22+(status:open%20OR%20status:merged)

Decide for yourself: live with the deprecation warning and no change in 
behaviour, or ... happy porting ... The latter will surely make your 
code better, but for most of you, that doesn't seem to be an issue.

BTW: this is the proposed replacement of QSDP/QESDP for Qt-internal use: 
https://codereview.qt-project.org/c/qt/qtbase/+/115213 and no, it will 
most certainly _not_ be public API again. It's the fact that these 
implementation details of Qt, QSDP and QESDP, are public, that prevents 
us from fixing them. I will not be part of another such lock-in.

Thanks,
Marc



More information about the Development mailing list