[qmlgallery] Porting to Qt5.