More porting to qgit2