Give user a possibility to choose a policy for saving files


- The server-supplied filename from the Content-Disposition header is
used to write a file to the local working directory. But it was done
without checking if the file with that name already exists.
It means a server could silently overwrite any file in the working
directory by choosing a colliding filename.
- To prevent this possibility, add setFileConflictPolicy() and
fileConflictPolicy() API to the BaseApi class.
This API allows users to control how filename conflicts are handled
when downloading files.

The following policies are added:
* Rename (default) — appends a numeric suffix (file(1).txt, file(2).txt, ...)
until a non-conflicting name is found.
* Overwrite — overwrite the existing file.
* Error — emits a qWarning and skips writing the file.

[ChangeLog][QtOpenApi] add setFileConflictPolicy() and
fileConflictPolicy() API.

Pick-to: 6.12
Task-number: QTBUG-147643
Change-Id: I44f5cb3a7fb64490c355875708d71888a39b4937
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitde9e36b1cc0a1a88307dc4d1d973fb8f5b2ca157
parent7145e8c60e67309f29243e7a23575df6f96a13f9
authorTatiana Borisova <tatiana.borisova@qt.io>
committerTatiana Borisova <tatiana.borisova@qt.io>
commit timeFri, 26 Jun 2026 10:37:42 +0000