Skip to content

Commit

Permalink
Add some const
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Aug 28, 2017
1 parent 64aa405 commit 500348e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -1435,4 +1435,4 @@ void QgsVectorLayerProperties::updateFieldsPropertiesDialog()
void QgsVectorLayerProperties::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html" ) );
}
}
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -2274,7 +2274,7 @@ bool QgsVectorLayer::changeAttributeValue( QgsFeatureId fid, int field, const QV
if ( !feature.isValid() )
return false;

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

if ( joinFeature.isValid() )
return info->joinLayer()->changeAttributeValue( joinFeature.id(), srcFieldIndex, newValue, oldValue );
Expand Down Expand Up @@ -2486,7 +2486,7 @@ bool QgsVectorLayer::deleteFeaturesFromJoinedLayers( QgsFeatureIds fids )
{
if ( info.isEditable() && info.hasCascadedDelete() )
{
QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( &info, getFeature( fid ) );
const QgsFeature joinFeature = mJoinBuffer->joinedFeatureOf( &info, getFeature( fid ) );
if ( joinFeature.isValid() )
info.joinLayer()->deleteFeature( joinFeature.id() );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayercache.cpp
Expand Up @@ -244,7 +244,7 @@ void QgsVectorLayerCache::onJoinAttributeValueChanged( QgsFeatureId fid, int fie
{
if ( joinLayer == info.joinLayer() )
{
QgsFeature feature = mLayer->joinBuffer()->targetedFeatureOf( &info, joinLayer->getFeature( fid ) );
const QgsFeature feature = mLayer->joinBuffer()->targetedFeatureOf( &info, joinLayer->getFeature( fid ) );

const QString fieldName = info.prefixedFieldName( joinLayer->fields().field( field ) );
const int fieldIndex = mLayer->fields().indexFromName( fieldName );
Expand Down
12 changes: 6 additions & 6 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -2070,20 +2070,20 @@ void QgsAttributeForm::updateIcon( QgsEditorWidgetWrapper *eww )

if ( !info->isEditable() )
{
QString file = QStringLiteral( "/mIconJoinNotEditable.svg" );
QString tooltip = tr( "Join settings do not allow editing" );
const QString file = QStringLiteral( "/mIconJoinNotEditable.svg" );
const QString tooltip = tr( "Join settings do not allow editing" );
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
}
else if ( mMode == QgsAttributeForm::AddFeatureMode && !info->hasUpsertOnEdit() )
{
QString file = QStringLiteral( "mIconJoinHasNotUpsertOnEdit.svg" );
QString tooltip = tr( "Join settings do not allow upsert on edit" );
const QString file = QStringLiteral( "mIconJoinHasNotUpsertOnEdit.svg" );
const QString tooltip = tr( "Join settings do not allow upsert on edit" );
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
}
else if ( !info->joinLayer()->isEditable() )
{
QString file = QStringLiteral( "/mIconJoinedLayerNotEditable.svg" );
QString tooltip = tr( "Joined layer is not toggled editable" );
const QString file = QStringLiteral( "/mIconJoinedLayerNotEditable.svg" );
const QString tooltip = tr( "Joined layer is not toggled editable" );
reloadIcon( file, tooltip, mIconMap[eww->widget()] );
}
}
Expand Down

0 comments on commit 500348e

Please sign in to comment.