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

Impossible to register the same type for both QtQuick1 and QtQuick2 in the same application

    XMLWordPrintable

Details

    Description

      Its currently impossible to use qmlRegisterType<X> for both Quick1 and Quick2 in the same application. Since the functions are identical in both qqml.h and qdeclarative.h, the linker will only allow one instance of the function. So even if you only include qqml.h in one translation unit and qdeclarative.h in the other. The linker still selects one of the two implementations for all calls to it.
      We have a codebase of ~10000 lines of qml code and we cannot just disable the old system while porting to the new Quick2.
      A dirty workaround for now is to encase qqml.h's qmlRegisterType with a namespace, but a better solution would be prefered.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            madwinter Marcus Tillmanns
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes