diff --git a/python/core/auto_generated/qgssnappingconfig.sip.in b/python/core/auto_generated/qgssnappingconfig.sip.in index 0417f3d313c..6d97072c414 100644 --- a/python/core/auto_generated/qgssnappingconfig.sip.in +++ b/python/core/auto_generated/qgssnappingconfig.sip.in @@ -73,7 +73,7 @@ This is a container of advanced configuration (per layer) of the snapping of the %End public: - IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) /Deprecated/; + IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) /Deprecated/; %Docstring IndividualLayerSettings @@ -81,6 +81,8 @@ IndividualLayerSettings :param type: :param tolerance: :param units: +:param minScale: +:param maxScale: .. deprecated:: QGIS 3.12 use the method with SnappingTypeFlag instead. @@ -96,6 +98,7 @@ IndividualLayerSettings :param units: :param minScale: :param maxScale: + .. versionadded:: 3.12 %End diff --git a/src/app/qgssnappinglayertreemodel.cpp b/src/app/qgssnappinglayertreemodel.cpp index 7d936d138fc..a90cbab1d55 100644 --- a/src/app/qgssnappinglayertreemodel.cpp +++ b/src/app/qgssnappinglayertreemodel.cpp @@ -156,7 +156,7 @@ void QgsSnappingLayerDelegate::setEditorData( QWidget *editor, const QModelIndex w->setCurrentIndex( w->findData( units ) ); } } - else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn) + else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn ) { QgsScaleWidget *w = qobject_cast( editor ); if ( w ) @@ -214,7 +214,7 @@ void QgsSnappingLayerDelegate::setModelData( QWidget *editor, QAbstractItemModel model->setData( index, w->value(), Qt::EditRole ); } } - else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn) + else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn ) { QgsScaleWidget *w = qobject_cast( editor ); if ( w ) diff --git a/src/app/qgssnappingwidget.h b/src/app/qgssnappingwidget.h index 3723dc41526..4fec63c0295 100644 --- a/src/app/qgssnappingwidget.h +++ b/src/app/qgssnappingwidget.h @@ -131,7 +131,7 @@ class APP_EXPORT QgsSnappingWidget : public QWidget DisplayMode mDisplayMode; //! modeChanged determines if widget are visible or not based on mode - void modeChanged(); + void modeChanged( ); QgsProject *mProject = nullptr; QgsSnappingConfig mConfig; diff --git a/src/app/vertextool/qgsvertextool.cpp b/src/app/vertextool/qgsvertextool.cpp index 29e84c39cc1..407cf6bb97a 100644 --- a/src/app/vertextool/qgsvertextool.cpp +++ b/src/app/vertextool/qgsvertextool.cpp @@ -769,7 +769,7 @@ QgsPointLocator::Match QgsVertexTool::snapToEditableLayer( QgsMapMouseEvent *e ) continue; config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings( - vlayer == currentVlayer, static_cast( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) ); + vlayer == currentVlayer, static_cast( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) ); } snapUtils->setConfig( config ); @@ -796,7 +796,7 @@ QgsPointLocator::Match QgsVertexTool::snapToEditableLayer( QgsMapMouseEvent *e ) continue; config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings( - vlayer->isEditable(), static_cast( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) ); + vlayer->isEditable(), static_cast( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) ); } snapUtils->setConfig( config ); diff --git a/src/core/qgssnappingconfig.h b/src/core/qgssnappingconfig.h index 6c7edea6f1d..5a0aff0dadb 100644 --- a/src/core/qgssnappingconfig.h +++ b/src/core/qgssnappingconfig.h @@ -120,7 +120,7 @@ class CORE_EXPORT QgsSnappingConfig * \param maxScale * \deprecated since QGIS 3.12 use the method with SnappingTypeFlag instead. */ - Q_DECL_DEPRECATED IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) SIP_DEPRECATED; + Q_DECL_DEPRECATED IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) SIP_DEPRECATED; /** * \brief IndividualLayerSettings @@ -132,7 +132,7 @@ class CORE_EXPORT QgsSnappingConfig * \param maxScale * \since QGIS 3.12 */ - IndividualLayerSettings( bool enabled, SnappingTypeFlag type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ); + IndividualLayerSettings( bool enabled, SnappingTypeFlag type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ); /** * Constructs an invalid setting diff --git a/tests/src/core/testqgssnappingutils.cpp b/tests/src/core/testqgssnappingutils.cpp index d96b24ec371..6b6b9ee80d2 100644 --- a/tests/src/core/testqgssnappingutils.cpp +++ b/tests/src/core/testqgssnappingutils.cpp @@ -33,7 +33,7 @@ struct FilterExcludePoint : public QgsPointLocator::MatchFilter { explicit FilterExcludePoint( const QgsPointXY &p ) : mPoint( p ) {} - bool acceptMatch( const QgsPointLocator::Match &match ) override { return match.point() != mPoint; } + bool acceptMatch( const QgsPointLocator::Match &match ) override { return match.point() != mPoint; } QgsPointXY mPoint; }; @@ -349,7 +349,7 @@ class TestQgsSnappingUtils : public QObject QgsSnappingConfig snappingConfig = u.config(); snappingConfig.setEnabled( true ); snappingConfig.setMode( QgsSnappingConfig::AdvancedConfiguration ); - QgsSnappingConfig::IndividualLayerSettings layerSettings( true, QgsSnappingConfig::VertexFlag, 0.2, QgsTolerance::ProjectUnits, 0.0, 0.0 ); + QgsSnappingConfig::IndividualLayerSettings layerSettings( true, QgsSnappingConfig::VertexFlag, 0.2, QgsTolerance::ProjectUnits, 0.0, 0.0 ); snappingConfig.setIntersectionSnapping( true ); snappingConfig.setIndividualLayerSettings( vCurveZ.get(), layerSettings ); u.setConfig( snappingConfig );