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

qt_add_qml_module generates strange include directives

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 6.2.2
    • None
    • All

    Description

      It is not a bug, but something probably strange enough to be reported (or probably I misunderstand something).

      If I compile qt-everywhere-src-6.2.2\qtdoc\examples\demos\hangman example from sources the following files are generated by MOC:

       

      hangman_autogen/include_Debug/LERR2N2HC3/moc_inappproductqmltype.cpp
      hangman_autogen/include_Debug/LERR2N2HC3/moc_inappproductqmltype.cpp.json
      

      and the following file is generated by qt_add_qml_module:

      hangman_qmltyperegistrations.cpp
      

      Source file moc_inapppurchasebackend.cpp includes its header as follows:

      #include "../../../../hangman/purchasing/qmltypes/inappproductqmltype.h"
      

      but hangman_qmltyperegistrations.cpp includes it differently:

      #include <inappproductqmltype.h>

      and it looks strange to me.

      IMHO qt_add_qml_module should include the headers in the same way the MOC does.

      probably inputFile attribute in moc_inappproductqmltype.cpp.json should be updated or some new attribute with the relative path should be added.

      I discussed this on the forum first and then reported here.

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              dmitriano Dmitry Efimov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes