Merge cherrypicks of [5054143, 5054520] into qt-release

Change-Id: I337f09f91d61402f2fece0ac98cb59e209fd7389