Example folder (regular text file and a file with a read-only flag):
qmake.exe -install qinstall to-copy dest
Cannot open dest\read-only-file.txt: Access is denied.
The command worked without errors on 5.12.2.
Bug was caused by this change. Code that ensured user write permissions on read-only files on Windows got removed. And since the change, that folder installation retains permissions, instead of changing to 644/755, now it breaks on read-only files.
On some context, how this was noticed: qtbase code in my env is fetched with all files as read-only by default, and now the process of building Qt via CMake ExternalProject fails on "installing" the qtbase\doc\global folder with qmake.
Attaching a patch, that returns the permission check before touch. I would assume that if the 'preservePermissions' flag is here to stay, it would make sense to leave the readOnly check there for error-safety reasons.