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

[Windows and WSL2] QML module that only contains C++ code breaks `all_qmllint` target

XMLWordPrintable

    • Windows
    • b6b2501e7 (dev), d7ab13edf (6.6), aa2032f41 (tqtc/lts-6.5)

      The attached project has the following subdirectory:

      # MyModule/CMakeLists.txt
      cmake_minimum_required(VERSION 3.16)
      project(MyModule)
      qt_add_qml_module(MyModule
          STATIC
          NO_LINT # Does not prevent build error from `all_qmllint`
          URI MyModule
          VERSION 1.0
          SOURCES cppobj.h # QML_ELEMENT only
          # QML_FILES MyItem.qml # Adding a *.qml file makes everything work as expected
      )
      
      

       

      Problem

      Building the `all_qmllint` target causes an error:

      [10/11 20.7/sec] cd /D D:\QtSupport\Unlintable\MyModule
      FAILED: MyModule/CMakeFiles/MyModule_qmllint D:/QtSupport/build-Unlintable-Desktop_Qt_6_5_2_MSVC2019_64bit-Debug/MyModule/CMakeFiles/MyModule_qmllint 
      cd /D D:\QtSupport\Unlintable\MyModule
      CreateProcess failed: The system cannot find the file specified.
      ninja: fatal: ReadFile: The handle is invalid.
      

       

      Workaround

      Add a dummy/unused *.qml file to the module

        For Gerrit Dashboard: QTBUG-115710
        # Subject Branch Project Status CR V

            kkohne Kai Köhne
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes