Skip to content

Commit

Permalink
Add convenience method QgsVectorLayer::getFeatures( expression )
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 22, 2015
1 parent 6952a38 commit 9b6e23d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 2 additions & 4 deletions python/core/qgsexpression.sip
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsexpression.cpp
Expand Up @@ -1657,7 +1657,7 @@ bool QgsExpression::unregisterFunction( QString name )

QStringList QgsExpression::gmBuiltinFunctions;

const QStringList &QgsExpression::BuiltinFunctions()
const QStringList& QgsExpression::BuiltinFunctions()
{
if ( gmBuiltinFunctions.isEmpty() )
{
Expand Down Expand Up @@ -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() )
{
Expand Down
8 changes: 6 additions & 2 deletions src/core/qgsexpression.h
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9b6e23d

Please sign in to comment.