[Development] RFC: Deprecating setSharable / isSharable in our containers and QString
Oswald Buddenhagen
oswald.buddenhagen at digia.com
Thu Feb 20 19:56:42 CET 2014
On Thu, Feb 20, 2014 at 09:12:29AM -0800, Thiago Macieira wrote:
> The others are obscure indeed. As part of my efforts, I want to make QString /
> QByteArray / QVector keep a null d pointer for anything that doesn't require
> deallocation and reference counting -- that is, everything that is a static
> literal and the null / empty situations. If I do that, then:
>
> QString hello = QStringLiteral("Hello");
> QString world = QStringLiteral("World");
>
> hello.d == world.d == nullptr;
>
> So is hello.isSharedWith(world)? So I agree with you, we should also deprecate
> isSharedWith.
>
i introduced it for use in qmake/library/, to support an elaborate
fromRawData() optimization.
it wouldn't matter if it wouldn't return anything useful for constants.
what are you planning to do?
More information about the Development
mailing list