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

Renaming local symbol does not work with code completion

    XMLWordPrintable

Details

    Description

      Case 1

      1) Type the code as follows.

      int someint = 0;
      const int total = 5;
      for (int some = 0; some < total; ++some) {
      }
      

      2) Press "Ctrl + Shift + R " on some;
      3) Select someint shown in code completion
      4) You can see the result of the B1.

      Case 2

      int someint = 0;
      const int total = 5;
      for
      

      2) Press "Ctrl + space" after for.
      3) Add snippets another "for" (copy and paste and remove int)
      4) After inserting snippet, "var" text is selected in default, press "so".
      5) Select someint shown in code completion (See snipetts-2.png)
      6) You can see the result of the B2.

      Case 3

      After inserting snippets
      Paste from clip board
      1) Type the code as follows.

       int someint = 0;
       const int total = 5;
       for
      

      2) Copy "someone" to the clipboard.
      3) Press "Ctrl + space" after for.
      4) Select another "for" snippet .
      5) After inserting snippet, "var" text is selected in default, press "Ctrl + V".
      6) -> symbol changed only under cursor.

      Expected: Change all same symbols simultaneously.
      Unexpected: Change only symbols under cursor.

      Attachments

        1. B1.png
          B1.png
          17 kB
        2. B2.png
          B2.png
          17 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes