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

Odd indentation with QML reformatting for multiline comments

    XMLWordPrintable

Details

    Description

      Reformatting a QML file with multiline comments (/* */) produces wrongly indented text.
      Take this example and reformat it in Qt Creator (the wrong indentation cant be shown here in Jira):

      Item {
          /*
          Item {
      
          }
          Item {
      
          }
          Item {
      
          }
          Item {
      
          }
          */
      }
      

      Also notice that the number of chars this formatting bug produces is O(n^2). Which means if you have a comment with 1000 lines and an indentation with 4 spaces, about 2MB of text will be produced! This makes the QtCreator unusably slow.

      Attachments

        Activity

          People

            mabenell Marco Benelli
            michaelwinkelmann Michael Winkelmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: