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

Follow symbol under cursor does not work with namespace and using-declaration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 12.0.1
    • C/C++/Obj-C++ Support
    • None

      Assume that I have a class inside a namespace. When defining a class's member function in the source file with help of a using-declaration (no full qualification), the "follow symbol under cursor" (Ctrl+Click) feature does not seem to work properly. See the example code below:

      test.h

      namespace Foo
      {
      class Bar
      {
          void func();
      };
      } 

      test.cpp

      using Foo::Bar;
      
      Bar::func()
      {
          return;
      } 

      I can click on the function declaration in test.h and it finds the definition in test.cpp, but clicking on the definition in test.cpp it won't find the declaration in test.h. With full qualification instead [writing Foo::Bar::func()] this works as expexcted.

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

            kandeler Christian Kandeler
            flooklab - -
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes