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

Find References doesn't work in init-statement of if conditions

    XMLWordPrintable

Details

    Description

      When one tries to do a "Find References to Symbol Under Cursor" and the method is inside an if-statement where there is also a init-statement it doesn't work:

      if (QScopedPointer<GitMerge> gitMerge(new GitMerge(mGitBase, mGitQlientCache)); gitMerge->isInMerge())
      {
          ...
      }

      Result of Find References:

      Result of advance search:

      Prove that removing the init-statement makes it work:

      This is really painful when dealing with code refactors.

      Attachments

        1. image-2021-02-28-12-19-55-149.png
          67 kB
          Francesc Martínez
        2. image-2021-02-28-12-20-31-617.png
          83 kB
          Francesc Martínez
        3. image-2021-02-28-12-21-23-756.png
          126 kB
          Francesc Martínez
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            francescmm Francesc Martínez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes