Skip to content
Permalink
Browse files
Add some const
  • 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.
@@ -1435,4 +1435,4 @@ void QgsVectorLayerProperties::updateFieldsPropertiesDialog()
void QgsVectorLayerProperties::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html" ) );
}
}
@@ -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 );
@@ -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() );
}
@@ -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 );
@@ -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()] );
}
}

0 comments on commit 500348e

Please sign in to comment.