Skip to content

Commit

Permalink
Remove a couple of QGIS deprecated function warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 20, 2024
1 parent 29c5727 commit 256e137
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/featuremodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void FeatureModel::applyGeometry()
{
ignoredFeature.insert( mLayer, QSet<QgsFeatureId>() << mFeature.id() );
}
geometry.avoidIntersections( intersectionLayers, ignoredFeature );
geometry.avoidIntersectionsV2( intersectionLayers, ignoredFeature );
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/core/layertreemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,9 @@ QVariant FlatLayerTreeModelBase::data( const QModelIndex &index, int role ) cons
case Qgis::LayerType::Group:
layerType = QStringLiteral( "grouplayer" );
break;
case Qgis::LayerType::TiledScene:
layerType = QStringLiteral( "tiledscenelayer" );
break;
}
}
return layerType;
Expand Down Expand Up @@ -1262,7 +1265,7 @@ void FlatLayerTreeModelBase::setLayerInTracking( QgsLayerTreeLayer *nodeLayer, b
QgsRectangle FlatLayerTreeModelBase::nodeExtent( const QModelIndex &index, QgsQuickMapSettings *mapSettings, const float buffer )
{
QgsRectangle extent;
extent.setMinimal();
extent.setNull();

const QModelIndex sourceIndex = mapToSource( index );
if ( !sourceIndex.isValid() )
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsquick/qgsquickelevationprofilecanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ void QgsQuickElevationProfileCanvas::setupLayerConnections( QgsMapLayer *layer,
case Qgis::LayerType::Annotation:
case Qgis::LayerType::PointCloud:
case Qgis::LayerType::Group:
case Qgis::LayerType::TiledScene:
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/geometryutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ GeometryUtils::GeometryOperationResult GeometryUtils::reshapeFromRubberband( Qgs
{
QHash<QgsVectorLayer *, QSet<QgsFeatureId>> ignoredFeature;
ignoredFeature.insert( layer, QSet<QgsFeatureId>() << fid );
geom.avoidIntersections( avoidIntersectionsLayers, ignoredFeature );
geom.avoidIntersectionsV2( avoidIntersectionsLayers, ignoredFeature );
}

if ( geom.isEmpty() ) //intersection removal might have removed the whole geometry
Expand Down

1 comment on commit 256e137

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.