Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29345

Qt Creator doesn't handle CMake AutoUic errors

    XMLWordPrintable

Details

    • All
    • 5e6afa4ce (15.0)

    Description

      The attached Qt Widgets project has a wrong include for the generated ui_mainwindow.h file.

      The build output looks like this:

      15:45:23: Starting: "/home/jobor/Qt/Tools/CMake/bin/cmake" --build /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug --target all
      [1/9 30.3/sec] Automatic MOC and UIC for target ui_files_cmake_playground
      FAILED: ui_files_cmake_playground_autogen/timestamp ui_files_cmake_playground_autogen/mocs_compilation.cpp /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/ui_files_cmake_playground_autogen/timestamp /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/ui_files_cmake_playground_autogen/mocs_compilation.cpp 
      cd /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug && /home/jobor/Qt/Tools/CMake/bin/cmake -E cmake_autogen /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/CMakeFiles/ui_files_cmake_playground_autogen.dir/AutogenInfo.json Debug && /home/jobor/Qt/Tools/CMake/bin/cmake -E touch /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/ui_files_cmake_playground_autogen/timestamp && /home/jobor/Qt/Tools/CMake/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/jobor/dev/personal/ui_files_cmake_playground /home/jobor/dev/personal/ui_files_cmake_playground /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/ui_files_cmake_playground_autogen/deps /home/jobor/dev/personal/build-ui_files_cmake_playground-Desktop_Qt_6_5_0_GCC_64bit-Debug/CMakeFiles/d/5e1042abd48001d627ed680e6da53377bc963d689a0dd05605ea43d8cba9df15.d
      
      AutoUic error
      -------------
      "SRC:/subfolder/myshareddialog.cpp"
      includes the uic file "shared/ui_shared_dialog.h",
      but the user interface file "shared_dialog.ui"
      could not be found in the following directories
        "SRC:/subfolder/shared"
        "SRC:/subfolder"
      
      ninja: build stopped: subcommand failed.
      15:45:23: The process "/home/jobor/Qt/Tools/CMake/bin/cmake" exited with code 1.
      

      However, the issues pane does not contain the AutoUic error:

      /home/jobor/dev/personal/broken/mainwindow.cpp:13: warning: Deleting pointer to incomplete type 'Ui::MainWindow' may cause undefined behavior
      :-1: error: ninja: build stopped: subcommand failed.
      /home/jobor/dev/personal/broken/mainwindow.cpp:2: error: './wrongo/bongo/ui_mainwindow.h' file not found
      /home/jobor/dev/personal/broken/mainwindow.cpp:6: error: Allocation of incomplete type 'Ui::MainWindow'
      /home/jobor/dev/personal/broken/mainwindow.cpp:8: error: Member access into incomplete type 'Ui::MainWindow'
      

      Expected is that the AutoUic error appears in the issues pane.

      Note that the same most probably happens for AutoMoc and AutoRcc errors as well.

      Attachments

        1. broken.tar.gz
          2 kB
          Joerg Bornemann
        2. issues_pane.png
          23 kB
          Joerg Bornemann
        For Gerrit Dashboard: QTCREATORBUG-29345
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            jbornema Joerg Bornemann
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes