Updated to QGIS 2.0 API