Pick-to: 6.5 6.6 Change-Id: If7482ff20079d91ddba26a1abcb06b3054cc72ad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>