Fix tests and reference image

This commit is contained in:
Martin Dobias 2020-04-08 09:07:58 +02:00 committed by Nyall Dawson
parent 0037e5675d
commit 7c1d1fe97c
4 changed files with 13 additions and 10 deletions

View File

@ -238,12 +238,9 @@ Returns ``True`` if preparation was successful.
Returns the set of any fields referenced by the active properties from the collection.
:param context: expression context the properties will be evaluated against.
.. note::
The optional argument ignoreContext has been added in QGIS 3.14. When set to true,
even fields not set in context's fields() will be reported - this is useful e.g. with vector tiles
where the actual available field names may not be known beforehand.
:param ignoreContext: This parameter has been added in QGIS 3.14. When set to true, even fields not set
in context's fields() will be reported - this is useful e.g. with vector tiles
where the actual available field names may not be known beforehand.
%End
virtual bool isActive( int key ) const = 0;
@ -550,6 +547,9 @@ Returns the calculated value of the highest priority property with the specified
Returns the set of any fields referenced by the active properties from the stack.
:param context: expression context the properties will be evaluated against.
:param ignoreContext: This parameter has been added in QGIS 3.14. When set to true, even fields not set
in context's fields() will be reported - this is useful e.g. with vector tiles
where the actual available field names may not be known beforehand.
%End
virtual bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const;

View File

@ -207,9 +207,9 @@ class CORE_EXPORT QgsAbstractPropertyCollection
/**
* Returns the set of any fields referenced by the active properties from the collection.
* \param context expression context the properties will be evaluated against.
* \note The optional argument ignoreContext has been added in QGIS 3.14. When set to true,
* even fields not set in context's fields() will be reported - this is useful e.g. with vector tiles
* where the actual available field names may not be known beforehand.
* \param ignoreContext This parameter has been added in QGIS 3.14. When set to true, even fields not set
* in context's fields() will be reported - this is useful e.g. with vector tiles
* where the actual available field names may not be known beforehand.
*/
virtual QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext(), bool ignoreContext = false ) const = 0;
@ -478,6 +478,9 @@ class CORE_EXPORT QgsPropertyCollectionStack : public QgsAbstractPropertyCollect
/**
* Returns the set of any fields referenced by the active properties from the stack.
* \param context expression context the properties will be evaluated against.
* \param ignoreContext This parameter has been added in QGIS 3.14. When set to true, even fields not set
* in context's fields() will be reported - this is useful e.g. with vector tiles
* where the actual available field names may not be known beforehand.
*/
QSet< QString > referencedFields( const QgsExpressionContext &context = QgsExpressionContext(), bool ignoreContext = false ) const override;
bool prepare( const QgsExpressionContext &context = QgsExpressionContext() ) const override;

View File

@ -146,7 +146,7 @@ void TestQgsVectorTileLayer::test_labeling()
QgsPalLayerSettings labelSettings;
labelSettings.drawLabels = true;
labelSettings.fieldName = "name";
labelSettings.fieldName = "name:en";
labelSettings.placement = QgsPalLayerSettings::OverPoint;
labelSettings.setFormat( format );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB