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

[REG 12.0.1 -> 13.0] "Extract Function" inserts pointless white space characters

    XMLWordPrintable

Details

    • 02de46110 (13.0)

    Description

      1. Have a block using braces in your code, e.g.:
            int x = 0;
            if (argc > 3) {
                ++x;
                
            }
        

        Please note that when you type in that code and press Return after "++x;", Creator inserts white space characters in the next line so you could go on typing with the expected indentation.

      2. Select "if".
      3. Right-click on the selection and select "Refactor" -> "Extract Function" from the context menu.
      4. Enter some name for the new function and click "OK".
        The code is moved to a new function, but the line below "++x;" now contains twice as many white space characters as before.

      The number of white spaces should not change. This worked correctly in Qt Creator 12.0.1.

      Found and tested by Squish test tst_CSUP03.

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              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