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

When autoformatting in a QML file, template string is removed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 4.9.2, Qt Creator 4.10.0-rc1
    • Quick / QML Support
    • None
    • all

    Description

      When using this snippet, the template string disappear, after auto-formatting

      Rectangle {
      	Rectangle {
      		id: rect
      		width: downloadProgressBar.visualPosition * parent.width
      		height: parent.height
      		radius: 2
      		color: "#17a81a"
      		Text {
      			verticalAlignment: Text.AlignVCenter
      			horizontalAlignment: Text.AlignHCenter
      			anchors.horizontalCenter: rect.horizontalCenter
      			text: `Downloading...${downloadProgressBar.value}`
      		}
      	}
      }
      

      After saving it becomes:

      Rectangle {
      	Rectangle {
      		id: rect
      		width: downloadProgressBar.visualPosition * parent.width
      		height: parent.height
      		radius: 2
      		color: "#17a81a"
      		Text {
      			verticalAlignment: Text.AlignVCenter
      			horizontalAlignment: Text.AlignHCenter
      			anchors.horizontalCenter: rect.horizontalCenter
      			text:
      		}
      	}
      }
      

      It has to be inside another qml type

      Attachments

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

        Activity

          People

            tjenssen Tim Jenssen
            roussinm Maxime Roussin-BĂ©langer
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes