Improve error handling in HttpFileElement
* get rid of unnecessary variables
* use QIODevice::Truncate instead of removing a file and
then re-creating it
* do not try to write() into a file if open() failed
* check the result of write()
* update the debug messages
Change-Id: I46a4552e157b2b43abefa6f81e09856564eabd80
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Rym Bouabid <rym.bouabid@qt.io>
| commit | cd6e89fab2c7b037a84aad3504dfdf1a61d0f12c |
| parent | dbd01b3abf92f2d860d016a20e5030edb2981abd |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Wed, 10 Sep 2025 11:53:00 +0200 |
- M src/main/resources/cpp-qt6-client/HttpFileElement.cpp.mustache
- M tests/auto/colorpalette/client/client/QtOAIHttpFileElement.cpp
- M tests/auto/colorpalette/qmlclient/client/OAIHttpFileElement.cpp
- M tests/auto/mediatype/client/client/QtOAIHttpFileElement.cpp
- M tests/auto/openapi2.0/client/client/QtOAIHttpFileElement.cpp
- M tests/auto/operation-parameters/client/client/QtOAIHttpFileElement.cpp
- M tests/auto/petstore/client/client/QtOAIHttpFileElement.cpp
- M tests/auto/petstore/qmlclient/client/OAIHttpFileElement.cpp