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

Switching header/source doesn't always find correct file

XMLWordPrintable

    • b63713a84 (10.0)

      Switching between header and souce, can jump between incorrect files:

      Find an example here: qtcreator_header_source.zip

       

      .
      ├── CMakeLists.txt
      ├── include
      │   ├── a
      │   │   └── mod.h      # A::Mod
      │   └── b
      │       └── mod.h      # B::Mod     F4 incorrectly brings me to src/a/mod.cpp
      ├── main.cpp
      └── src
          ├── a
          │   └── mod.cpp    # A::Mod     F4 incorrectly brings me to include/b/mod.h
          └── b
              └── mod.cpp    # B::Mod
       

      Think about it...

      Which source will match
      include/b/mod.h
      
      Is it
           src/a/mod.h
      or   src/b/mod.h
      
      ???

      It must be possible to get a list of sources and headers and just remove the file-extensions suffixes and then do a check for the maximum matching suffix....
       
      So that
      include/b/mod.h
      will match best with
          src/b/mod.cpp
       

      Or maybe (more complex) link all C++ datatypes to files, so that B::Mod will link to 

      include/b/mod.h
      and
          src/b/mod.cpp

      but not to
                 src/a/mod.cpp

        For Gerrit Dashboard: QTCREATORBUG-28878
        # Subject Branch Project Status CR V

            kandeler Christian Kandeler
            an A. N.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes