Pick-to: 6.7 6.8 Change-Id: I6f91d5b684bcc16eb145d5c504ccc8dbe9149c8a Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>