Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
6.x
-
Windows 10, prebuilt Qt 6.2.2, prebuilt MinGW 9 (gcc version 11.2.0).
-
c3c9c843795023f76a5a6ed99db819eff0fe66c2
Description
With the fboitem example, I get the following compiler warning:
In file included from C:/Qt/6.2.2/mingw_64/include/QtQml/qqml.h:43, from fboitem_qmltyperegistrations.cpp:7: C:/Qt/6.2.2/mingw_64/include/QtQml/qqmlprivate.h: In function 'void QQmlPrivate::createInto(void*, void*) [with T = FboInSGRenderer]': C:/Qt/6.2.2/mingw_64/include/QtQml/qqmlprivate.h:188:45: warning: 'static void QQmlPrivate::QQmlElement<T>::operator delete(void*, void*) [with T = FboInSGRenderer]' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 188 | void createInto(void *memory, void *) { new (memory) QQmlElement<T>; } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ C:/Qt/6.2.2/mingw_64/include/QtQml/qqmlprivate.h:188:45: note: returned from 'void* operator new(std::size_t, void*)'
It also happens when the QML type is exported from C++ using qmlRegisterType<>, instead of adding this to the .pro file:
CONFIG += qmltypes QML_IMPORT_NAME = SceneGraphRendering QML_IMPORT_MAJOR_VERSION = 1