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

Allow single line formatting

XMLWordPrintable

    • Linux/Wayland

      ShellRoot {
          LazyLoader { active: true; component: Comp {} }
      } 

      Formats to on save:

      ShellRoot {
          LazyLoader {
              active: true
              component: Comp {}
          }
      }

      `.qmlformat.ini`:

      [General]
      UseTabs=false
      IndentWidth=4
      NewlineType=unix
      NormalizeOrder=false
      FunctionsSpacing=false
      ObjectsSpacing=false
      MaxColumnWidth=100 

      My preference is to not waste so many lines for simple declaration, I prefer single line `LazyLoader { active: true; component: Comp {} }`

      Is this already possible?

      I couldn't reproduce this with `qmlformat` in terminal, `qmlformat --version` = `qmlformat 1.0`. I installed everything from aur package: https://aur.archlinux.org/packages/quickshell not sure if that a part of a problem.

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

            qtqmlteam Qt Qml Team User
            pegnesipse x x
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes