added managing of transition from deprecated API to newest avoidn running error in stable qgis