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

Indentation error after auto [] word

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: Qt Creator 4.13.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux (Ubuntu 18.04)
    • Platform/s:
      All

      Description

      Qt Creator editor is doing the wrong indentation after auto unwrap. It seems to be considering this a lambda. The indentation changes adding 12 spaces (I'm using 4 spaces to indent)

      Example of wrong indentation

       

          for (const QVariant &v : l) {
              auto [account, ns] = parser.parse_namespace_key(v.toString());
                      QTreeWidgetItem *item = new QTreeWidgetItem(); // <-- Wrong indentation
      

       

       

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kandeler Christian Kandeler
              Reporter:
              thiedri Thiago Massari Guedes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes