This bug is not fixed in 5.2.0:
Simply try this, it will fail:
It is easy to track the problem: the Qt implementation relies on GetLastError, but this Microsoft API has a bug, as mentionned there:
Hence the Qt implementation fails.
I suggest to revert to the previous Qt implementation.