Use a new Qt5.1 feature that allows some code reduction for QML classes.
Add support for the latest cap.