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

Follow symbol gets confused with identically named symbols in different projects.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 2.4.0
    • C/C++/Obj-C++ Support
    • None

    Description

      I submitted this a few years ago, and the answer was "yeah we know, but this would be complicated to fix". Still, I've just lost many minutes to this bug so am motivated to resubmit it!

      Basically, create two projects, open them both and create two identical symbols (classes, functions, whatever) in the projects. Now if you ctrl-click / follow symbol to get to the definition of one of these symbols, it often jumps to the other project file! There's little warning about this (the only thing is the highlighted file in the file list), so I've spend a lot of time editing the wrong file, and wondering why my changes had no effect!

      And in case you're wondering why on earth someone would have two things the same, well it is server and client thing using the same code. Copying the files is by far the easiest way to do this.

      The fix (well, hacky fix) is surely fairly simple: if more than one symbol location is found, prefer the one in the same project! I understand you guys are moving to an LLVM-based code parser. Would that fix this bug? If not, it might be worth implementing a less hacky fix...

      Attachments

        Issue Links

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

          Activity

            People

              leamelo Leandro T. C. Melo
              timmmm Tim
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes