Skip to content

Commit a30ddaa

Browse files
committedAug 11, 2014
more const-correctness and avoid ambiguity in overloaded function
1 parent d8f2120 commit a30ddaa

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed
 

‎python/core/qgsattributeaction.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class QgsAttributeAction
7878
*/
7979
void doAction( int index,
8080
QgsFeature &feat,
81-
const QMap<QString, QVariant> *substitutionMap = 0 ) /PyName=doActionFeatureWithSubstitution/;
81+
const QMap<QString, QVariant> *substitutionMap ) /PyName=doActionFeatureWithSubstitution/;
8282

8383
//! Removes all actions
8484
void clearActions();

‎src/core/qgsattributeaction.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void QgsAttributeAction::removeAction( int index )
5353
}
5454
}
5555

56-
void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValueIndex )
56+
void QgsAttributeAction::doAction(int index, const QgsFeature& feat, int defaultValueIndex )
5757
{
5858
QMap<QString, QVariant> substitutionMap;
5959
if ( defaultValueIndex >= 0 )
@@ -66,8 +66,7 @@ void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValue
6666
doAction( index, feat, &substitutionMap );
6767
}
6868

69-
void QgsAttributeAction::doAction( int index, QgsFeature &feat,
70-
const QMap<QString, QVariant> *substitutionMap )
69+
void QgsAttributeAction::doAction( int index, const QgsFeature &feat, const QMap<QString, QVariant> *substitutionMap )
7170
{
7271
if ( index < 0 || index >= size() )
7372
return;

‎src/core/qgsattributeaction.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class CORE_EXPORT QgsAttributeAction
118118
* @note available in python bindings as doActionFeature
119119
*/
120120
void doAction( int index,
121-
QgsFeature &feat,
121+
const QgsFeature &feat,
122122
int defaultValueIndex = 0 );
123123

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

135135
//! Removes all actions
136136
void clearActions() { mActions.clear(); }

0 commit comments

Comments
 (0)
Please sign in to comment.