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

Auto-indent with lambda returning a type is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 3.6.0
    • C/C++/Obj-C++ Support
    • None
    • Mac OS X 10.8

      The following is a result when using ->QVector<float> returns from a lambda. If ->QVector<float> is omitted, the indention works correctly. Otherwise indention after the lambda expression is all messed up.

          qDebug() << "Before!";
          
          auto contourData = [this]()->QVector<float> {
                  QVector<float> data;
                  return data;           
      };
                  
                  qDebug() << "I get here";
      

      I expected the indention to look something like this:

          qDebug() << "Before!";
          
          auto contourData = [this]()->QVector<float> {
              QVector<float> data;
              return data;           
          };
                  
          qDebug() << "I get here";
      

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

            kosjar Nikolai Kosjar
            vpicaver Philip Schuchardt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes