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

Follow symbol does not work correctly for overloaded functions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 2.8.0, Qt Creator 2.8.1
    • C/C++/Obj-C++ Support
    • None
    • i386 GNU/Linux

      If definition of method is inside of the class everything works fine, but when it goes outside, it always follows to the last method.

      Seems like `const` qualifier screws things up. With out `const` it works!

      Take a loot at example:

      class Foo1 { };
      class Foo2 { };
      class Foo3 { };
      
      class Foo
      {
          void bar(int a);
      
          void bar(const Foo1 & foo);
          void bar(const Foo2 & foo);
          void bar(const Foo3 & foo);
      };
      
      
      
      int main(int argc, char ** argv)
      {
          Foo foo;
      
          Foo1 foo1;
          foo.bar(foo1);
          Foo2 foo2;
          foo.bar(foo2);
          Foo3 foo3;
          foo.bar(foo3);
      }
      
      
      
      
      void Foo::bar(const Foo1 & foo)
      {
      
      }
      
      void Foo::bar(const Foo2 & foo)
      {
      
      }
      
      void Foo::bar(const Foo3 & foo)
      {
      
      }
      

      Following `foo.bar(foo1)` and `foo.bar(foo2)` always switches to `void Foo::bar(const Foo3 & foo)`.

      Also please answer, is it intended behaviour for 'Find Usages' to ignore function/method signature and search only by it's name?

      Thank you!

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

            kosjar Nikolai Kosjar
            greenscape Paul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes