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

Code model gets confused with windows SUBST drives

    XMLWordPrintable

Details

    • Windows

    Description

      I use windows subst drives to simplify locations of files and make things unified between machines. 

      I perform this by having this registry entry: 

      HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\DOS Devices

      and add a string entry. For example:

      name: w:

      contents: ??\C:\Users\user\w_drive

       

      This is quite useful and it is enabled at every boot. 

       

      In the last versions of Qt creator, I think it started with 7.0, I open a C++ file from a CMake project. I get the file location as w: drive. Example w:\code.cpp but when pressing F2 to go to the definition of some fucntion in the headers, it goes to the real file location: C:\Users\user\w_drive\code.h which sometimes leads to QtCreator to have 2 instances of the same file opened, one from w: drive and one from c:\users\user\w_drive. 

       

      This problem affects the code model that is sometimes does not know where to find function definitions in cpp if you press F2 from the header file.

       

      this might be a problem in clang rather than QTcreator or how QtCreator uses clang for file indexing

       

      I will be happy to provide more details if needed

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              nunix Nuno Pedrosa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes