Skip to content
Permalink
Browse files
Add convenience method QgsVectorLayer::getFeatures( expression )
  • Loading branch information
m-kuhn committed May 22, 2015
1 parent 6952a38 commit 9b6e23d3afb356e370f27752070187f5eaea1b01
Showing with 10 additions and 8 deletions.
  1. +2 −4 python/core/qgsexpression.sip
  2. +2 −2 src/core/qgsexpression.cpp
  3. +6 −2 src/core/qgsexpression.h
@@ -225,11 +225,9 @@ class QgsExpression
};


static const QList<QgsExpression::Function *> &Functions();
// static QList<Function*> gmFunctions;
static const QList<QgsExpression::Function *>& Functions();

// static QStringList gmBuiltinFunctions;
static const QStringList &BuiltinFunctions();
static const QStringList& BuiltinFunctions();

static bool registerFunction( Function* function );
static bool unregisterFunction( QString name );
@@ -1657,7 +1657,7 @@ bool QgsExpression::unregisterFunction( QString name )

QStringList QgsExpression::gmBuiltinFunctions;

const QStringList &QgsExpression::BuiltinFunctions()
const QStringList& QgsExpression::BuiltinFunctions()
{
if ( gmBuiltinFunctions.isEmpty() )
{
@@ -1700,7 +1700,7 @@ const QStringList &QgsExpression::BuiltinFunctions()

QList<QgsExpression::Function*> QgsExpression::gmFunctions;

const QList<QgsExpression::Function*> &QgsExpression::Functions()
const QList<QgsExpression::Function*>& QgsExpression::Functions()
{
if ( gmFunctions.isEmpty() )
{
@@ -352,11 +352,11 @@ class CORE_EXPORT QgsExpression
QStringList mAliases;
};

static const QList<Function*> &Functions();
static QList<Function*> gmFunctions;
static const QList<Function*>& Functions();

static QStringList gmBuiltinFunctions;
static const QStringList &BuiltinFunctions();
static const QStringList& BuiltinFunctions();

static bool registerFunction( Function* function );
static bool unregisterFunction( QString name );
@@ -574,7 +574,11 @@ class CORE_EXPORT QgsExpression
public:
NodeLiteral( QVariant value ) : mValue( value ) {}

<<<<<<< HEAD
QVariant value() const { return mValue; }
=======
inline QVariant value() const { return mValue; }
>>>>>>> c943e22... Revert "Add convenience method QgsVectorLayer::getFeatures( expression )"

virtual NodeType nodeType() const override { return ntLiteral; }
virtual bool prepare( QgsExpression* parent, const QgsFields &fields ) override;

0 comments on commit 9b6e23d

Please sign in to comment.