Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132886

qmlformat: The colon in the switch statement is in the wrong position.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.4, 6.8, 6.9.1, 6.10.0 FF
    • 6.5.3, 6.8.1
    • QML: Tooling
    • None
    • Edision Windows 10 Enterprise
      Version 22H2
      OS build 19045.5247
    • Windows
    • b91ca3e0b (dev), d5b0705f4 (6.9), 69280e3eb (6.8)

    Description

      If there is a comment on the case line of the switch statement, qmlformat will move the colon one line down.
      This seems to be a bug, since it does not occur when there are no comments on the case line.

      I am using qmlformat from Qt 6.5.3.

      switch (something) {
      case 0: //
      

      switch (something) {
      case 0 //
      :
      

      Attachments

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

        Activity

          People

            sami.shalayel Sami Shalayel
            ikuma Ikuma Tomizu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes