[Development] Deprecation of QByteArray operator const char *()?
Ch.Ehrlicher at gmx.de
Fri Jan 25 22:36:04 CET 2019
Am 25.01.2019 um 21:23 schrieb Thiago Macieira:
> On Friday, 25 January 2019 12:11:33 PST Christian Ehrlicher wrote:
>> The two implicit conversions from QByteArray to const char*/void*
>> (QByteArray::operator const char *() and QByteArray::operator const
>> void*()) were marked as obsolete with Qt5.0 but never get decorated as
>> such. This means their usage even inside QtBase is huge (I would say at
>> least 70-80 locations).
>> Therefore my question before I'm pushing a patch to add QT_DEPRECATED_X
>> to them - is the deprecation still valid?
> I'd un-deprecate them. The use to casting to char* is way too useful.
> But I wasn't aware we event had a void* cast.
Here the commit which deprecated the functions:
I found one place inside QtBase which hit this problem:
More information about the Development