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

Deprecate Qml multiline string literals

    XMLWordPrintable

Details

    Description

      Currently all string literals in Qml can contain newlines.
      This was good when javascript had no support for multiline strings.
      Now javascript has string templates

      ```

          greetings = "hi"
          s = `
             ${greetings}
             multiline
             template string`
      ```

      and supporting newlines in the other strings is a needless source of incompatibility.

      We should warn about them and support rewriting them as templates.

      Please note that several javascript interpreters support newlines when preceded by a backslash, eating to some special handling of backslashes at the end of a multiline string in places.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            fawzi Fawzi Mohamed
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes