On Saturday 23 May 2015 15:35:23 Иван Комиссаров wrote:
> Hi.
> 
> I’ve created a QVector of QImages and tried to insert an image in the
> vector: QVector<QImage> images;
> images.insert(images.begin(), QImage());
> 
> 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?

Yes.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to