Merge cherrypicks of [5369419, 5369173] into qt-release

Change-Id: Idd4a48cd299af44c67940fcf9ab895668b8c2ee8