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

        For Gerrit Dashboard: QTBUG-92448
        # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change