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

Follow Symbol Under Cursor does not work for unique_ptr

    XMLWordPrintable

    Details

    • Commits:
      07f8c474be629de75780d235df62a50ae6f27870

      Description

      If an objects defines operator->() (like all smart pointer do), and it is used to dereference inner object, Follow Symbol Under Cursor (F2) does not point to right point.

      For example try to press F2 on "run" part of a->run(); in the code below:

      #include <iostream>
      #include <memory>

      class A {
      public:
      void run()

      { std::cout << "run\n"; }

      };

      int main()
      {
      std::unique_ptr<A> a(new A);
      a->run();
      }

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                orgads Orgad Shaneh
                Reporter:
                mpusz Mateusz Pusz
              • Votes:
                15 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes