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

Inconsistent handling of Enter when changing variable's name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.0.0-rc1
    • C/C++/Obj-C++ Support
    • Windows 7 64 bit

    Description

      1. Open a source file which contains a functions call, e.g.:
        QString s;
        s.length();
        
      2. Move the cursor to the function call.
      3. Press Alt+Enter.
        Creator proposes the quick fix "Assign to Local Variable".
      4. Press Enter to select this quick fix.
        The line will be changed to:
        int localLength = s.length();
        
      5. Type some letters.
        These will be used as name for the new variable.
      6. Press Enter to quit editing the filename.
        A newline will be inserted.
      7. Add a usage of the new variable, e.g.:
        int newName
                = s.length();
        newName = 0;
        
      8. Move the cursor to the filename
      9. Press Ctrl+Shift+R to start renaming the variable.
      10. Type some letters.
        These will be added to the existing filename.
      11. Press Enter to quit editing the filename.
        No newline will be inserted.

      In both cases Creator should react in the same way to pressing Enter. I think it should just quit editing the variable's name and not add a newline.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes