Details
-
Bug
-
Resolution: Done
-
P2: Important
-
QDS 2.2.0, QDS 2.1
-
Windows 10 Pro version 2004
-
-
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.