Received a pattern file that didn't work with QCAD.
More details in this topic
My custom tool Tile2Hatch also failed to cast the pattern dashes and or dots once.
And then I would expected a build in report or a failure on that 90% of the first bunch of definition lines where invalid.
After investigation the lines don't seem to end in \n or \r\n (NewLine or CarriageReturn + NewLine)
QTextStream.readLine() then reads the whole file with all occurring \r removed.
Searched online and this tells me that with Qt detecting End of Line is indeed hardcoded to \r\n and \n.
However, I can make it work.
Notepad++ is able to convert the EOL format of Windows (CR LF), Unix (LF) or Macintosh (CR).
Using or Windows, or Unix format the pattern is loaded.
I would have said "loaded perfectly" if the pattern was coded reasonable OK.
It is not ideal that users have to edit online sourced patterns, it is not a standalone case.
Thanks for any advice.
Regards,
