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

qml import scan ignores actual project structure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.9.6, 5.11.0, 5.11.1
    • Build tools: qmake
    • None
    • Qt Creator 4.6.2
      Qt 5.11.1 (or 5.9.6)
      Xcode 9.4.1
      macOs 10.13
    • iOS/tvOS/watchOS

    Description

      There is a defect in qmake for IOS for some relative paths to the RESOURCES files. I have
      created a simple project to reproduce this. The project files look like this:

      top/main.cpp
      top/platform/ios/ios.pro <-------
      top/platform/ios/ios.pro.user
      top/src/qml/HomeForm.ui.qml
      top/src/qml/main.qml
      top/src/qml/Page1Form.ui.qml
      top/src/qml/Page2Form.ui.qml
      top/src/qml/qml.qrc
      top/src/qml/qtquickcontrols2.conf
      top/top.pro <-------

      Notice there are 2 *.pro files. The are both a main *.pro for the project.
      By opening top.pro versus ios.pro I am illustrating the defect.

      Using Qt Creator and top.pro do the following:

      1. Open the top.pro project
      2. Configure it to build with Qt 5.11.1 for the IOS simulator.
      3. Run qmake (Build > Run Qmake)
      4. Stop and examine the build directory. You should see the following files:
      Info.plist
      Makefile
      top.xcodeproj
      top_plugin_import.cpp
      top_qml_plugin_import.cpp

      Next do the same steps for the ios.pro file.
      It produces a build directory in the top/platform directory.
      The list of files is missing the top_qml_plugin_import.cpp file.

      Info.plist
      Makefile
      top.xcodeproj
      top_plugin_import.cpp

      When the import statements in main.qml are processed during the qmake run,
      it should generate this missing file. If the project is built using
      ios.pro, the application will crash at runtime because the import modules
      are missing.

      The significant difference between the 2 *.pro files is the relative
      path to the qml.qrc file.

      Attachments

        Issue Links

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

          Activity

            People

              buddenha Oswald Buddenhagen
              skycrestway Gary Holmlund
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes