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

Lambda formating is odd sometimes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P4: Low
    • None
    • Qt Creator 4.3.1
    • C/C++/Obj-C++ Support
    • Qt Creator master version @ 70ffdb99d8d6b0610ab4a6bc6f765f1c46b59980

    Description

      Seems that a 2nd lambda in a function call is wrongly indent.

      QFile::Permissions QFileInfo::permissions() const
      {
          Q_D(const QFileInfo);
          return d->checkAttribute<QFile::Permissions>(
                      QFileSystemMetaData::Permissions,
                      [d]() { return d->metaData.permissions(); },
              [d]() {
                  return QFile::Permissions(d->getFileFlags(QAbstractFileEngine::PermsMask) & QAbstractFileEngine::PermsMask);
              });
      }
      

      I guess it happens because the line is longer then 120 characters, but under-indenting one argument looks wrong.

      Discussed here:

      https://codereview.qt-project.org/#/c/200074/1/src/corelib/io/qfileinfo.cpp

       

      Attachments

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

        Activity

          People

            artem.sokolovskii Artem Sokolovskii
            nierob Nierob
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes