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

Teach QMetaType how to get metatype for T from metatype for T*

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Core: Object Model
    • None

      In the QML engine, we have a need to get the QMetaType for T when give the QMetaType for T* (in ExecutionEngine::toVariant). Currently this works by obtaining the name of T*, removing the "*" character, and doing a lookup of the cut name.

      At least for the case where T has a QMetaObject, we could do better, by storing the QMetaType of T in its QMetaObject, and then calling metaType().metaObject().metaType() (which works because metatypes of pointers to QObject/QGadget have access to the QMetaObject).

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

            fabiankosmale Fabian Kosmale
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes