[Development] Qt 5: Warning using QImage as QtConcurrent::mapped return type
Stephen Chu
stephen at ju-ju.com
Sat Sep 29 21:53:15 CEST 2012
The following code generates warning about memcpy on object type:
QList<QImage> images;
QList<QImage> future = QtConcurrent::blockingMapped(images, scaled);
The warning:
In file included from /Qt/5.0/qtbase/include/QtCore/qvector.h:1:
/Qt/5.0/qtbase/include/QtCore/../../src/corelib/tools/qvector.h:459:56:
warning: source of this 'memcpy' call is a pointer to dynamic class
'QImage'; vtable pointer will be copied [-Wdynamic-class-memaccess]
::memcpy(static_cast<void *>(dst), srcBegin,
(srcEnd - srcBegin) * sizeof(T));
~~~~~~~~ ^
It seems that Qt thinks QImage is a POD type?
More information about the Development
mailing list