[Development] Deprecation of QByteArray operator const char *()?

Olivier Goffart olivier at woboq.com
Sat Jan 26 08:22:54 CET 2019


On 25.01.19 21:11, Christian Ehrlicher wrote:
> Hello,
> 
> 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 count 4331 uses

https://code.woboq.org/data/symbol.html?root=../qt5/&ref=_ZNK10QByteArraycvPKcEv

That's a bit more than 70-80

Given somebody would have to fix all of these before marking the function as 
depracated, that sounds like a lot of work!

the const void* operator has only 4 uses and should probably be deprecated.

https://code.woboq.org/data/symbol.html?root=../qt5/&ref=_ZNK10QByteArraycvPKvEv


-- 
Olivier

Woboq - Qt services and support - https://woboq.com - https://code.woboq.org



More information about the Development mailing list