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

Using subscript operator breaks indentation of next line

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • Qt Creator 10.0.0-beta1
    • Qt Creator 3.2.1, Qt Creator 3.2.2, Qt Creator 3.3.0
    • C/C++/Obj-C++ Support
    • None

    Description

      Following indentation

      std::vector v1(5);
      std::cout << v1[0] << " "
                         << " " << v1[1];
      

      should be

      std::vector v1(5);
      std::cout << v1[0] << " "
                << " " << v1[1];
      

      .

      This is only one example. Using subscript operator when passing argument to function/constructor would also produce wrong indentation on next line.

      I.e.

      foo(a, b,
          c);
      foo(a, arr[0],
             b, arr[1]);
      

      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
              sasavilic Sasa Vilic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes