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

Auto-indent with lambda as function argument

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 3.6.0, Qt Creator 4.3.0-beta1
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Qt5.5.1 QtCreator 3.6.0 Ubuntu 14.04 64bit

      Description

      Here is the problem:

      After auto-indentation, I got this:

      void function(MovieMetadata* movieMetadata)
      {
          auto future =  QtConcurrent::map(movieMetadataList, [&](MovieMetadata* movieMetadata){
               this->addMovieMetadata_p(movieMetadata);
      });
      }
      

      As you can see, it doesn't look good, the }); should be at least 4 spaces to be in same level with auto. But the best is to be as the following :

      void function(MovieMetadata* movieMetadata)
      {
          auto future = QtConcurrent::map(movieMetadataList, [&](MovieMetadata* movieMetadata){
                            this->addMovieMetadata_p(movieMetadata);
                        });
      }
      

        Attachments

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

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              theshadowx Ali Diouri
            • Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes