[Development] Is QImage movable
abbapoh at gmail.com
Sat May 23 14:35:23 CEST 2015
I’ve created a QVector of QImages and tried to insert an image in the vector:
I got a compiler warning saying
"qvector.h:649:21: warning: destination for this 'memmove' call is a pointer to dynamic class 'QImage'; vtable pointer will be overwritten [-Wdynamic-class-memaccess]»
This happens because QImage inherits QPaintDevice (which is virtual) and QImage is declared movable using Q_DECLARE_SHARED macro.
Is this behavior intended?
More information about the Development