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

Compilation with QML_ELEMENT enabled class fails if it's in a subdirectory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.3.0 Beta2
    • QML: Compiler
    • None

    Description

      Using the following simple layout without adding foo to the target_include_directories

      allinclusive
      ├── CMakeLists.txt
      ├── foo
      │   ├── person.cpp
      │   └── person.h
      ├── main.cpp
      └── main.qml
      

      compiles into

      /home/cajus/tmp/allinclusive/build/appinherit_qmltyperegistrations.cpp:10:10: fatal error: person.h: No such file or directory
         10 | #include <person.h>
            |          ^~~~~~~~~~
      compilation terminated.
      

      . This feels a bit unexpected and requires adding many additional includes in bigger projects - which may lead conflicts.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              cajus Cajus Pollmeier
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes