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

Common prefixes are no longer removed from file groups

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • Qt Creator 12.0.0
    • None
    • Windows 10
      CMake
    • Windows

    Description

      In Qt Creator <= 11.0.3 the Projects panel would automatically skip showing common prefix directories and only show the deepest view required to differentiate files (this is with Simplify View turned off).

      The issue can be demonstrated with a CMake like so

      add_executable(prefix_test
          src/core.h
          src/core.cpp
          src/referenceelectionconfig.h
          src/referenceelectionconfig.cpp
          src/resultspresenter.h
          src/resultspresenter.cpp
      )
      
      

      In this case "src" is the common prefix.

       

      In Creator 11.0.3 this displays as:

      where as in 12.0.0 is shows as:

       

      As you can see the "redundant" 'src' directory is shown in 12.0.0. In this simple example this isn't a huge deal, but this extends to large examples like:

       

      add_executable(prefix_test
          include/namespace/component/subcomponent1/header.h
          include/namespace/component/subcomponent2/header.h
      )
      

       

      where you need the lengthy structure for organization purposes (e.g. public API headers)

      but many of the root folders are empty/all the same. In 11.0.3 creator would drop `include/namespace/component` and only show `subcomponent/header.h` and `subcomponent2/header.h` in the "Include Files" source_group I use (or just Headers if not using a source group), but in 12.0.0 you have to expand every subfolder shown to get to the actually files (regardless of if source_group is used).

       

      I'm not sure if this was intentional or not (I'll try to bisect this later), but I prefer the old behavior if it was.

       

      Attachments

        1. After-1.PNG
          After-1.PNG
          20 kB
        2. Before-3.PNG
          Before-3.PNG
          31 kB
        3. QtCreator13-source_group_TREE_FILES.png
          QtCreator13-source_group_TREE_FILES.png
          413 kB
        4. QtCreator13-source_group_TREE.png
          QtCreator13-source_group_TREE.png
          349 kB
        5. QtCreator-13-SourceGroups.png
          QtCreator-13-SourceGroups.png
          331 kB
        6. Xcode-source_group_TREE_FILES.png
          Xcode-source_group_TREE_FILES.png
          438 kB
        7. Xcode-source_group_TREE.png
          Xcode-source_group_TREE.png
          356 kB
        8. Xcode-SourceGroups.png
          Xcode-SourceGroups.png
          343 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            oblivioncth Chris Heimlich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes