Qt: some work towards upgrading to Qt 5.4 (#513) [ci skip].