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

Clangd misbehaves with SUBST drives

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 9.0.0-rc1
    • C/C++/Obj-C++ Support
    • None
    • Windows

    Description

      C:\>subst
      D:\: => C:\VirtPart\Drive.D

      qmake project.  Clangd in effect.  My project is fully indexed with the 9.0.0-rc1 version of clangd.  Qt 6.3.2 MinGW 11.2 project (ignore Qt5_12 in some of the paths below, Qt 5.12 is not actually being used).

       

       

      On my development machine, Qt Creator itself is accessed via the D: mapping.  Preferences/C++/Clangd path to executable is also via D: mapping.  All other settings and project configuration/paths are also via D: mapping. 

      If I have a file open in Creator editor, again via D: mapping, and I do a code model search on a symbol in that file with "Find References to Symbol", the files returned by the search are all found with the unmapped C: version of the path:

       

       

      If I click on one of those results, and its containing file is NOT already open in Creator editor, it will be opened as the unmapped C: path.  If the file IS already open in the editor, no problem, the editor just switches to the mapped D: file.  But having a file open in the editor via the wrong, unmapped C: path is problematic because then Build menu/Build Subproject is unavailable from that file, and the File System view linked to the current open editor file bounces around to the wrong path, among other problems.

      The workaround for this problem is tedious:  I have to always remember to open a file via the Locator first, to force it to open via the correct mapped D: path, and only then click on a code model search result.

       

      QTCREATORBUG-28170, marked resolved, addressed another recent problem with SUBST drives

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            millirem JG Miller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes