Started porting to Qt 5.x. Issue #10