Skip to content
Permalink
Browse files

more const-correctness and avoid ambiguity in overloaded function

  • Loading branch information
3nids committed Aug 11, 2014
1 parent d8f2120 commit a30ddaabf4879b685204c246a0edc02ef054fa4c
Showing with 6 additions and 7 deletions.
  1. +1 −1 python/core/qgsattributeaction.sip
  2. +2 −3 src/core/qgsattributeaction.cpp
  3. +3 −3 src/core/qgsattributeaction.h
@@ -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();
@@ -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 )
@@ -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;
@@ -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
@@ -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(); }

0 comments on commit a30ddaa

Please sign in to comment.
You can’t perform that action at this time.