More work on config generation. Added a workaround for QTBUG-8217