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

For loop auto rename variable name on auto completion does not work anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 12.0.0
    • Qt Creator 11.0.3
    • Editors
    • None
    • Linux/X11

    Description

      When autocompleting a for loop (by typing for and then Ctrl + Space, Enter), the automatically created variable var won't be automatically renamed in the condition nor expression of the for loop.

       

      To reproduce

      1. Type
        for
      2. Hit Ctrl + Space (to open autocompletion selection window)
      3. Autocomplete for loop by selecting appropriate line and pressing Enter
      4. Rename variable var after int in for loop declaration

       

      After 3.

      for (int var = 0; var < total; ++var) {} 

      Current behavior after 4.

      for (int test = 0; var < total; ++var) {}  

      Expected (and old) behavior:

      for (int test = 0; test < total; ++test) {}  

      Attachments

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

        Activity

          People

            davschul David Schulz
            vxgrid Martin Graner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes