Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10427

projectRootPath in .qmlproject is ignored by QDS

    XMLWordPrintable

Details

    • All

    Description

      projectRootPath in .qmlproject is ignored in QDS.

      https://doc.qt.io/QtForMCUs-2.4/qtul-qmlproject-projectnode-projectrootpath.html

      The test project is attached. (Qt for MCUs project)

      The project has UntitledProject2.qmlproject, which has this line in line 6:

          projectRootPath: ".." 

      If the project is opened in QDS and launch button is pressed, the app launches without issues.

      This is not an expected behavior, because projectRootPath is pointing the one-level-above path from where UntitledProject2.qmlproject is located and all the relative paths inside it, such as 

          QmlFiles {
              directory: "."
          } 

      Should not be able to find .qml files for launching the app. 

      On the other hand, when you open the CMakeLists.txt, the configuration fails, because the projectRootPath is pointed to the one-level-above path where there is no .qml files required for the configuration. Here is the output from the Qt Creator.

      Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/Users/81808/Downloads/UntitledProject2 -B C:/Users/81808/Downloads/build-UntitledProject2-Qt_for_MCUs_2_6_Desktop_32bpp_MINGW-Debug "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Users\81808\Downloads\build-UntitledProject2-Qt_for_MCUs_2_6_Desktop_32bpp_MINGW-Debug/.qtc/package-manager/auto-setup.cmake" "-DCMAKE_CXX_COMPILER:STRING=C:/Qt/Tools/mingw1120_64/bin/g++.exe" "-DCMAKE_C_COMPILER:STRING=C:/Qt/Tools/mingw1120_64/bin/gcc.exe" "-DQUL_COLOR_DEPTH:STRING=32" "-DQUL_COMPILER_NAME:STRING=gnu" "-DQUL_GENERATORS:STRING=C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/QulGenerators.cmake" "-DQUL_PLATFORM:STRING=qt" "-DQul_ROOT:STRING=C:\Qt\QtMCUs\2.6.0_UL-7916" in C:\Users\81808\Downloads\build-UntitledProject2-Qt_for_MCUs_2_6_Desktop_32bpp_MINGW-Debug.-- The C compiler identification is GNU 11.2.0-- The CXX compiler identification is GNU 11.2.0-- The ASM compiler identification is GNU-- Found assembler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Check for working C compiler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe - skipped-- Detecting C compile features-- Detecting C compile features - done-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/g++.exe - skipped-- Detecting CXX compile features-- Detecting CXX compile features - done-- CMake version 3.24.2-- IPO is disabled for desktop backends-- Qul Platform Boards Directory: C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/../../../platform/boards-- Qul Target Platform Directory: C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/../../../platform/boards/qt/qt-- Loading board defaults from C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/../../../platform/boards/qt/qt/cmake/BoardDefaults_32bpp_default.qmlprojectconfig file-- Qul Color Depth: 32-- QUL_DEFAULT_RESOURCE_IMAGE_PIXEL_FORMAT: Automatic-- QUL_PLATFORM_DEFAULT_RESOURCE_PIXEL_FORMAT_ALPHA: ARGB8888-- QUL_PLATFORM_DEFAULT_RESOURCE_PIXEL_FORMAT_OPAQUE: XRGB8888-- OS: baremetal-- Found Qt6Bundle: C:/Qt/QtMCUs/2.6.0_UL-7916/lib  found components: Core Gui Widgets -- Translation tools from C:/Qt/QtMCUs/2.6.0_UL-7916/bin will be used[qmlprojectexporter] warning: Problem during load of qmlproject file[qmlprojectexporter] C:/Users/81808/Downloads/UntitledProject2/UntitledProject2.qmlproject:10:5: warning: It is not recommended to use the 'directory' property. The build system might not be able to correctly track the contents of the directory, so always clean and rebuild whenever adding or removing files. Additionally, every file present in the directory at configure time will be added to the application binary, which might increase the memory footprint. Prefer explicit inclusion of the needed files using the 'files' property to avoid these issues.    QmlFiles {
          ^~~~~~~~[qmlprojectexporter] C:/Users/81808/Downloads/UntitledProject2/UntitledProject2.qmlproject:18:5: warning: It is not recommended to use the 'directory' property. The build system might not be able to correctly track the contents of the directory, so always clean and rebuild whenever adding or removing files. Additionally, every file present in the directory at configure time will be added to the application binary, which might increase the memory footprint. Prefer explicit inclusion of the needed files using the 'files' property to avoid these issues.    ImageFiles {
          ^~~~~~~~~~[qmlprojectexporter] error: Problem during load of qmlproject file[qmlprojectexporter] C:/Users/81808/Downloads/UntitledProject2/UntitledProject2.qmlproject:62:18: error: 'C:/Users/81808/Downloads/imports' does not exist    importPaths: [ "imports" ]
                       ^~~~~~~~~~~~~[qmlprojectexporter] C:/Users/81808/Downloads/UntitledProject2/UntitledProject2.qmlproject:37:16: error: File 'imports/Constants/constants_module.qmlproject' does not exist        files: [
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~CMake Error at C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/QulMacros.cmake:568 (message):  qmlprojectexporter failed while processing  C:/Users/81808/Downloads/UntitledProject2/UntitledProject2.qmlproject: 1Call Stack (most recent call first):  C:/Qt/QtMCUs/2.6.0_UL-7916/lib/cmake/Qul/QulMacros.cmake:2542 (qul_private_target_set_qmlproject)  CMakeLists.txt:10 (qul_add_target)
      
      -- Configuring incomplete, errors occurred!See also "C:/Users/81808/Downloads/build-UntitledProject2-Qt_for_MCUs_2_6_Desktop_32bpp_MINGW-Debug/CMakeFiles/CMakeOutput.log".CMake process exited with exit code 1.
      Elapsed time: 00:03.
       

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes