Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more const-correctness and avoid ambiguity in overloaded function
  • Loading branch information
3nids committed Aug 11, 2014
1 parent d8f2120 commit a30ddaa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsattributeaction.sip
Expand Up @@ -78,7 +78,7 @@ class QgsAttributeAction
*/
void doAction( int index,
QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap = 0 ) /PyName=doActionFeatureWithSubstitution/;
const QMap<QString, QVariant> *substitutionMap ) /PyName=doActionFeatureWithSubstitution/;

//! Removes all actions
void clearActions();
Expand Down
5 changes: 2 additions & 3 deletions src/core/qgsattributeaction.cpp
Expand Up @@ -53,7 +53,7 @@ void QgsAttributeAction::removeAction( int index )
}
}

void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValueIndex )
void QgsAttributeAction::doAction(int index, const QgsFeature& feat, int defaultValueIndex )
{
QMap<QString, QVariant> substitutionMap;
if ( defaultValueIndex >= 0 )
Expand All @@ -66,8 +66,7 @@ void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValue
doAction( index, feat, &substitutionMap );
}

void QgsAttributeAction::doAction( int index, QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap )
void QgsAttributeAction::doAction( int index, const QgsFeature &feat, const QMap<QString, QVariant> *substitutionMap )
{
if ( index < 0 || index >= size() )
return;
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsattributeaction.h
Expand Up @@ -118,7 +118,7 @@ class CORE_EXPORT QgsAttributeAction
* @note available in python bindings as doActionFeature
*/
void doAction( int index,
QgsFeature &feat,
const QgsFeature &feat,
int defaultValueIndex = 0 );

/*! Does the action using the expression builder to expand it
Expand All @@ -129,8 +129,8 @@ class CORE_EXPORT QgsAttributeAction
* @note available in python bindings as doActionFeatureWithSubstitution
*/
void doAction( int index,
QgsFeature &feat,
const QMap<QString, QVariant> *substitutionMap = 0 );
const QgsFeature& feat,
const QMap<QString, QVariant> *substitutionMap );

//! Removes all actions
void clearActions() { mActions.clear(); }
Expand Down

0 comments on commit a30ddaa

Please sign in to comment.