Move around some code to keep the following changes understandable. Task-number: UL-2012 Change-Id: Ib05699b893d2f7d1cf846507adb198b893187954 Reviewed-by: hjk <hjk@qt.io>