[Development] Question about the QDataBuffer from src/gui/painting

Maks Naumov maksqwe1 at ukr.net
Sun Oct 25 20:28:39 CET 2015


In my small change https://codereview.qt-project.org/#/c/138795/ 
Marc Mutz wrote: "This class deserves to die. If you do not believe, copy an instance and you'll see." 

I agree with him, but it will be quite a big change because it is used in many places. 
https://github.com/qtproject/qtbase/search?utf8=%E2%9C%93&q=QDataBuffer 

QDataBuffer is a small version of std::vector with disabilities and the constructor 
with one parameter(array size). It is intended only for the primitive data types. 
https://github.com/qtproject/qtbase/blob/5.6/src/gui/painting/qdatabuffer_p.h 

What do you think is it worth to leave QDataBuffer and update it a little? 
For example to add Q_DECL_NOEXCEPT, Q_DECL_CONSTEXPR ..., 
Type * buffer replace with QScopedPointer with QScopedPointerPodDeleter? 
Or replace QDataBeffer where it is used by the std::vector, of course, 
if it doesn't hurt performance? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20151025/4d6c5a63/attachment.html>


More information about the Development mailing list