Check the results of mesh file writes


writeMeshData() made fifteen device->write() calls and checked none of
them, and Mesh::save() returned a valid id whatever happened, so a
device that filled up part way through produced a truncated .mesh file
and told the caller it had succeeded.

Route the writes that bypass QDataStream through one checked helper,
test that and the stream's status once at the end, and have save()
return 0 when the data could not be written.

Change-Id: I3b9506da046747a7058fb0b2b44d4e9af60fa285
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
commitfbcf9bb6f5859deb99a88ae7e628920e5783590d
parent0905d2b9ded8d0f9b8ed982b29633432acb94534
authorAndy Nichols <andy.nichols@qt.io>
committerAndy Nichols <andy.nichols@qt.io>
commit timeFri, 4 Sep 2026 07:53:22 +0000