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

Asset import fails silently if component name contains illegal character

    XMLWordPrintable

Details

    • All
    • QDS 2D - 2021 Week 41/42, QDS 2D - 2021 Week 43/44, QDS 2D - 2021 Week 45/46

    Description

      See the attached Figma project. It contains 3 shapes with the following names:

      • "Shape 1"
      • "Shape 1: Blackened"
      • "Shape 2"

       

      Exporting the project was uneventful (attached). Importing produced the following log (see attached screenshot):

      Writing Component
      C:/Test/TestProject/Bad Name/View.ui.qml
      Copied asset:
      C:/Qt/Tools/QtDesignStudio/bin/Shape 21.png
      Copied asset:
      C:/Qt/Tools/QtDesignStudio/bin/Shape 11.png
      Copied asset:
      C:/Qt/Tools/QtDesignStudio/bin/Shape 1: Blackened1.png
      Import done.

       

      Issue

      The log lied. "Shape 1: Blackened1.png" was not produced because Windows does not permit ':' in filenames. Instead, a 0-byte file with a truncated name was produced in its place.

       

      Workaround

      Rename the component and remove the illegal characters before exporting.

       

      Suggestions

      • The importer should check for illegal filename characters and replace them with something legal.
      • The importer should not report "Copied asset" if it failed to copy for whatever reason.

      Attachments

        1. Bad Name.fig
          13 kB
        2. Bad Name-2021-08-21-12.4.37_UTC.zip
          7 kB
        3. import-log_20H2.png
          import-log_20H2.png
          21 kB
        4. import-log.png
          import-log.png
          12 kB

        Issue Links

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

          Activity

            People

              vikas Vikas Pachdha
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes