Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add convenience method QgsVectorLayer::getFeatures( expression )
- Loading branch information
Showing
with
10 additions
and
8 deletions.
-
+2
−4
python/core/qgsexpression.sip
-
+2
−2
src/core/qgsexpression.cpp
-
+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; |
|
|