Skip to content

Commit 722fdef

Browse files
committedOct 5, 2016
referencedColumns returns QSet<QString> instead of QStringList
The order of the elements is irrelevant and duplicate elements are unwanted. It is therefore a perfect candidate for a set instead of a list. This prevents filtering for duplicates manually be replacing some filer codes with (more performant) builtin methods of QSet.
1 parent 3767cd4 commit 722fdef

File tree

70 files changed

+250
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+250
-245
lines changed
 

‎doc/api_break.dox

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,9 @@ version instead.</li>
710710
<li>helptext() has been renamed to helpText()</li>
711711
<li>isValid() has been renamed to checkExpression()</li>
712712
<li>acceptVisitor() has been removed</li>
713+
<li>QgsExpression::referencedColumns() returns QSet<QString> instead of QStringList</li>
714+
<li>QgsExpression::Node::referencedColumns() returns QSet<QString> instead of QStringList</li>
715+
<li>QgsExpression::Function::referencedColumns() returns QSet<QString> instead of QStringList</li>
713716
</ul>
714717

715718
\subsection qgis_api_break_3_0_QgsFeature QgsFeature
@@ -1482,6 +1485,8 @@ optional property map passing down layer level properties to the SLD encoders. I
14821485
<code>scaleMinDenom</code> and <code>scaleMaxDenom</code> properties.</li>
14831486
<li>The RotationField capabitity was removed. This is now handled using data defined rotation at a symbol layer level</li>
14841487
<li>setScaleMethodToSymbol was removed. This is now handled using data defined scaling at a symbol layer level</li>
1488+
<li>setScaleMethodToSymbol was removed. This is now handled using data defined scaling at a symbol layer level</li>
1489+
<li>usedAttributes is now a const method and returns QSet<QString> instead of QStringList</li>
14851490
</ul>
14861491

14871492

‎python/core/qgsdatadefined.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class QgsDataDefined
128128
* @param context expression context, used for preparing the expression if required
129129
* @note added in QGIS 2.12
130130
*/
131-
QStringList referencedColumns( const QgsExpressionContext& context = QgsExpressionContext() );
131+
QSet<QString> referencedColumns( const QgsExpressionContext& context = QgsExpressionContext() );
132132

133133
/**
134134
* Get the field which this QgsDataDefined represents. Be aware that this may return

0 commit comments

Comments
 (0)
Please sign in to comment.