Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-1835

qml property syntax errors can break import of a file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • QDS 2.0
    • QDS 1.5.0
    • Photoshop Exporter
    • None

    Description

      If you use the "as qml" feature and add extra qml properties, if these properties are not properly formatted it can cause the whole import to fail (along with a error message that sends you in the wrong direction)

       

      i think whatever is added there in the qml properties should be effectively sandboxed so at worst the import works but the component doesn’t (at least then you’ll get the syntax error highlighting in the text editor.)

       

      In this example the syntax error is as follows:

      text: qsTr("Button") /// Correct property syntax for the default button text

      text: qsTr("Button" /// Missing the closing bracket, this will cause the import to fail completely with the following import error.

      I've attached an example psd file and an exported folder where you can see the bug in action.

      buttonMalformed.psd

      buttonMalformed.psd_1517.zip

       

      Attachments

        1. buttonMalformed.psd
          44 kB
          Brook Cronin
        2. buttonMalformed.psd_1517.zip
          2 kB
          Brook Cronin
        3. malformedQMLProperty1.png
          252 kB
          Brook Cronin
        4. malformedQMLProperty2.png
          159 kB
          Brook Cronin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vikas Vikas Pachdha
            brook_cronin_qt Brook Cronin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes