Skip to content
Permalink
Browse files

[Expression] redirect duplicate QString expression() to QString dump()

  • Loading branch information
m-kuhn committed Oct 31, 2013
1 parent 5cd7566 commit ad27dfe1c61bf2219678dfdb40816a7a671b3b9a
@@ -1616,12 +1616,11 @@ int QgsExpression::functionCount()


QgsExpression::QgsExpression( const QString& expr )
: mExpression( expr )
, mRowNumber( 0 )
: mRowNumber( 0 )
, mScale( 0 )
, mCalc( 0 )
{
mRootNode = ::parseExpression( mExpression, mParserErrorString );
mRootNode = ::parseExpression( expr, mParserErrorString );

if ( mParserErrorString.isNull() )
Q_ASSERT( mRootNode );
@@ -151,7 +151,8 @@ class CORE_EXPORT QgsExpression

int scale() {return mScale; }

const QString& expression() const { return mExpression; }
//! Alias for {@link dump()}
const QString expression() const { return dump(); }

//! Return the parsed expression as a string - useful for debugging
QString dump() const;
@@ -600,7 +601,6 @@ class CORE_EXPORT QgsExpression

void initGeomCalculator();

QString mExpression;
Node* mRootNode;

QString mParserErrorString;
@@ -132,7 +132,7 @@ QString QgsFeatureListModel::parserErrorString()
return mParserErrorString;
}

const QString& QgsFeatureListModel::displayExpression() const
const QString QgsFeatureListModel::displayExpression() const
{
return mExpression->expression();
}
@@ -56,7 +56,7 @@ class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFea
*/
QString parserErrorString();

const QString& displayExpression() const;
const QString displayExpression() const;
bool featureByIndex( const QModelIndex& index, QgsFeature& feat );
QgsFeatureId idxToFid( const QModelIndex& index ) const;
QModelIndex fidToIdx( const QgsFeatureId fid ) const;
@@ -87,7 +87,7 @@ bool QgsFeatureListView::setDisplayExpression( const QString expression )
}
}

const QString& QgsFeatureListView::displayExpression() const
const QString QgsFeatureListView::displayExpression() const
{
return mModel->displayExpression();
}
@@ -91,7 +91,7 @@ class GUI_EXPORT QgsFeatureListView : public QListView
*
* @see QgsExpression
*/
const QString& displayExpression() const;
const QString displayExpression() const;

/**
* Returns a detailed message about errors while parsing a QgsExpression.

0 comments on commit ad27dfe

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