Skip to content

Commit 500348e

Browse files
committed
Add some const
1 parent 64aa405 commit 500348e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/app/qgsvectorlayerproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,4 +1435,4 @@ void QgsVectorLayerProperties::updateFieldsPropertiesDialog()
14351435
void QgsVectorLayerProperties::showHelp()
14361436
{
14371437
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html" ) );
1438-
}
1438+
}

src/core/qgsvectorlayer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,7 +2274,7 @@ bool QgsVectorLayer::changeAttributeValue( QgsFeatureId fid, int field, const QV
22742274
if ( !feature.isValid() )
22752275
return false;
22762276

2277-
QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( info, feature );
2277+
const QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( info, feature );
22782278

22792279
if ( joinFeature.isValid() )
22802280
return info->joinLayer()->changeAttributeValue( joinFeature.id(), srcFieldIndex, newValue, oldValue );
@@ -2486,7 +2486,7 @@ bool QgsVectorLayer::deleteFeaturesFromJoinedLayers( QgsFeatureIds fids )
24862486
{
24872487
if ( info.isEditable() && info.hasCascadedDelete() )
24882488
{
2489-
QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( &info, getFeature( fid ) );
2489+
const QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( &info, getFeature( fid ) );
24902490
if ( joinFeature.isValid() )
24912491
info.joinLayer()->deleteFeature( joinFeature.id() );
24922492
}

src/core/qgsvectorlayercache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void QgsVectorLayerCache::onJoinAttributeValueChanged( QgsFeatureId fid, int fie
244244
{
245245
if ( joinLayer == info.joinLayer() )
246246
{
247-
QgsFeature feature = mLayer->joinBuffer()->targetedFeatureOf( &info, joinLayer->getFeature( fid ) );
247+
const QgsFeature feature = mLayer->joinBuffer()->targetedFeatureOf( &info, joinLayer->getFeature( fid ) );
248248

249249
const QString fieldName = info.prefixedFieldName( joinLayer->fields().field( field ) );
250250
const int fieldIndex = mLayer->fields().indexFromName( fieldName );

src/gui/qgsattributeform.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,20 +2070,20 @@ void QgsAttributeForm::updateIcon( QgsEditorWidgetWrapper *eww )
20702070

20712071
if ( !info->isEditable() )
20722072
{
2073-
QString file = QStringLiteral( "/mIconJoinNotEditable.svg" );
2074-
QString tooltip = tr( "Join settings do not allow editing" );
2073+
const QString file = QStringLiteral( "/mIconJoinNotEditable.svg" );
2074+
const QString tooltip = tr( "Join settings do not allow editing" );
20752075
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
20762076
}
20772077
else if ( mMode == QgsAttributeForm::AddFeatureMode && !info->hasUpsertOnEdit() )
20782078
{
2079-
QString file = QStringLiteral( "mIconJoinHasNotUpsertOnEdit.svg" );
2080-
QString tooltip = tr( "Join settings do not allow upsert on edit" );
2079+
const QString file = QStringLiteral( "mIconJoinHasNotUpsertOnEdit.svg" );
2080+
const QString tooltip = tr( "Join settings do not allow upsert on edit" );
20812081
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
20822082
}
20832083
else if ( !info->joinLayer()->isEditable() )
20842084
{
2085-
QString file = QStringLiteral( "/mIconJoinedLayerNotEditable.svg" );
2086-
QString tooltip = tr( "Joined layer is not toggled editable" );
2085+
const QString file = QStringLiteral( "/mIconJoinedLayerNotEditable.svg" );
2086+
const QString tooltip = tr( "Joined layer is not toggled editable" );
20872087
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
20882088
}
20892089
}

0 commit comments

Comments
 (0)