Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99895

FBO scenegraph example generates compiler warning

    XMLWordPrintable

Details

    • 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
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            jkauffmann Johannes Kauffmann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes