Skip to content

Commit b52fff3

Browse files
committed
avoid duplicate function help entry
1 parent bdd4388 commit b52fff3

File tree

4 files changed

+41
-40
lines changed

4 files changed

+41
-40
lines changed

resources/function_help/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FILE(GLOB HELP_FILES *)
2+
23
LIST(REMOVE_ITEM HELP_FILES ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt)
34

45
SET(HELP_OUTPUT "${CMAKE_SOURCE_DIR}/src/core/qgsexpression_texts.cpp")

src/core/qgsexpression.cpp

+38-38
Original file line numberDiff line numberDiff line change
@@ -1765,43 +1765,43 @@ const QList<QgsExpression::Function*> &QgsExpression::Functions()
17651765
<< new StaticFunction( "color_hsva", 4, fncColorHsva, "Color" )
17661766
<< new StaticFunction( "color_cmyk", 4, fcnColorCmyk, "Color" )
17671767
<< new StaticFunction( "color_cmyka", 5, fncColorCmyka, "Color" )
1768-
<< new StaticFunction( "$geometry", 0, fcnGeometry, "Geometry", "", true )
1769-
<< new StaticFunction( "$area", 0, fcnGeomArea, "Geometry", "", true )
1770-
<< new StaticFunction( "$length", 0, fcnGeomLength, "Geometry", "", true )
1771-
<< new StaticFunction( "$perimeter", 0, fcnGeomPerimeter, "Geometry", "", true )
1772-
<< new StaticFunction( "$x", 0, fcnX, "Geometry", "", true )
1773-
<< new StaticFunction( "$y", 0, fcnY, "Geometry", "", true )
1774-
<< new StaticFunction( "xat", 1, fcnXat, "Geometry", "", true )
1775-
<< new StaticFunction( "yat", 1, fcnYat, "Geometry", "", true )
1776-
<< new StaticFunction( "xmin", 1, fcnXMin, "Geometry", "", true )
1777-
<< new StaticFunction( "xmax", 1, fcnXMax, "Geometry", "", true )
1778-
<< new StaticFunction( "ymin", 1, fcnYMin, "Geometry", "", true )
1779-
<< new StaticFunction( "ymax", 1, fcnYMax, "Geometry", "", true )
1780-
<< new StaticFunction( "geomFromWKT", 1, fcnGeomFromWKT, "Geometry" )
1781-
<< new StaticFunction( "geomFromGML", 1, fcnGeomFromGML, "Geometry" )
1782-
<< new StaticFunction( "bbox", 2, fcnBbox, "Geometry" )
1783-
<< new StaticFunction( "disjoint", 2, fcnDisjoint, "Geometry" )
1784-
<< new StaticFunction( "intersects", 2, fcnIntersects, "Geometry" )
1785-
<< new StaticFunction( "touches", 2, fcnTouches, "Geometry" )
1786-
<< new StaticFunction( "crosses", 2, fcnCrosses, "Geometry" )
1787-
<< new StaticFunction( "contains", 2, fcnContains, "Geometry" )
1788-
<< new StaticFunction( "overlaps", 2, fcnOverlaps, "Geometry" )
1789-
<< new StaticFunction( "within", 2, fcnWithin, "Geometry" )
1790-
<< new StaticFunction( "buffer", -1, fcnBuffer, "Geometry" )
1791-
<< new StaticFunction( "centroid", 1, fcnCentroid, "Geometry" )
1792-
<< new StaticFunction( "bounds", 1, fcnBounds, "Geometry", "", true )
1793-
<< new StaticFunction( "bounds_width", 1, fcnBoundsWidth, "Geometry", "", true )
1794-
<< new StaticFunction( "bounds_height", 1, fcnBoundsHeight, "Geometry", "", true )
1795-
<< new StaticFunction( "convexHull", 1, fcnConvexHull, "Geometry" )
1796-
<< new StaticFunction( "difference", 2, fcnDifference, "Geometry" )
1797-
<< new StaticFunction( "distance", 2, fcnDistance, "Geometry" )
1798-
<< new StaticFunction( "intersection", 2, fcnIntersection, "Geometry" )
1799-
<< new StaticFunction( "symDifference", 2, fcnSymDifference, "Geometry" )
1800-
<< new StaticFunction( "combine", 2, fcnCombine, "Geometry" )
1801-
<< new StaticFunction( "union", 2, fcnCombine, "Geometry" )
1802-
<< new StaticFunction( "geomToWKT", -1, fcnGeomToWKT, "Geometry" )
1803-
<< new StaticFunction( "geometry", 1, fcnGetGeometry, "Geometry" )
1804-
<< new StaticFunction( "transform", 3, fcnTransformGeometry, "Geometry" )
1768+
<< new StaticFunction( "$geometry", 0, fcnGeometry, "GeometryGroup", "", true )
1769+
<< new StaticFunction( "$area", 0, fcnGeomArea, "GeometryGroup", "", true )
1770+
<< new StaticFunction( "$length", 0, fcnGeomLength, "GeometryGroup", "", true )
1771+
<< new StaticFunction( "$perimeter", 0, fcnGeomPerimeter, "GeometryGroup", "", true )
1772+
<< new StaticFunction( "$x", 0, fcnX, "GeometryGroup", "", true )
1773+
<< new StaticFunction( "$y", 0, fcnY, "GeometryGroup", "", true )
1774+
<< new StaticFunction( "xat", 1, fcnXat, "GeometryGroup", "", true )
1775+
<< new StaticFunction( "yat", 1, fcnYat, "GeometryGroup", "", true )
1776+
<< new StaticFunction( "xmin", 1, fcnXMin, "GeometryGroup", "", true )
1777+
<< new StaticFunction( "xmax", 1, fcnXMax, "GeometryGroup", "", true )
1778+
<< new StaticFunction( "ymin", 1, fcnYMin, "GeometryGroup", "", true )
1779+
<< new StaticFunction( "ymax", 1, fcnYMax, "GeometryGroup", "", true )
1780+
<< new StaticFunction( "geomFromWKT", 1, fcnGeomFromWKT, "GeometryGroup" )
1781+
<< new StaticFunction( "geomFromGML", 1, fcnGeomFromGML, "GeometryGroup" )
1782+
<< new StaticFunction( "bbox", 2, fcnBbox, "GeometryGroup" )
1783+
<< new StaticFunction( "disjoint", 2, fcnDisjoint, "GeometryGroup" )
1784+
<< new StaticFunction( "intersects", 2, fcnIntersects, "GeometryGroup" )
1785+
<< new StaticFunction( "touches", 2, fcnTouches, "GeometryGroup" )
1786+
<< new StaticFunction( "crosses", 2, fcnCrosses, "GeometryGroup" )
1787+
<< new StaticFunction( "contains", 2, fcnContains, "GeometryGroup" )
1788+
<< new StaticFunction( "overlaps", 2, fcnOverlaps, "GeometryGroup" )
1789+
<< new StaticFunction( "within", 2, fcnWithin, "GeometryGroup" )
1790+
<< new StaticFunction( "buffer", -1, fcnBuffer, "GeometryGroup" )
1791+
<< new StaticFunction( "centroid", 1, fcnCentroid, "GeometryGroup" )
1792+
<< new StaticFunction( "bounds", 1, fcnBounds, "GeometryGroup", "", true )
1793+
<< new StaticFunction( "bounds_width", 1, fcnBoundsWidth, "GeometryGroup", "", true )
1794+
<< new StaticFunction( "bounds_height", 1, fcnBoundsHeight, "GeometryGroup", "", true )
1795+
<< new StaticFunction( "convexHull", 1, fcnConvexHull, "GeometryGroup" )
1796+
<< new StaticFunction( "difference", 2, fcnDifference, "GeometryGroup" )
1797+
<< new StaticFunction( "distance", 2, fcnDistance, "GeometryGroup" )
1798+
<< new StaticFunction( "intersection", 2, fcnIntersection, "GeometryGroup" )
1799+
<< new StaticFunction( "symDifference", 2, fcnSymDifference, "GeometryGroup" )
1800+
<< new StaticFunction( "combine", 2, fcnCombine, "GeometryGroup" )
1801+
<< new StaticFunction( "union", 2, fcnCombine, "GeometryGroup" )
1802+
<< new StaticFunction( "geomToWKT", -1, fcnGeomToWKT, "GeometryGroup" )
1803+
<< new StaticFunction( "geometry", 1, fcnGetGeometry, "GeometryGroup" )
1804+
<< new StaticFunction( "transform", 3, fcnTransformGeometry, "GeometryGroup" )
18051805
<< new StaticFunction( "$rownum", 0, fcnRowNumber, "Record" )
18061806
<< new StaticFunction( "$id", 0, fcnFeatureId, "Record" )
18071807
<< new StaticFunction( "$currentfeature", 0, fcnFeature, "Record" )
@@ -2836,7 +2836,7 @@ QString QgsExpression::group( QString name )
28362836
gGroups.insert( "Date and Time", QObject::tr( "Date and Time" ) );
28372837
gGroups.insert( "String", QObject::tr( "String" ) );
28382838
gGroups.insert( "Color", QObject::tr( "Color" ) );
2839-
gGroups.insert( "Geometry", QObject::tr( "Geometry" ) );
2839+
gGroups.insert( "GeometryGroup", QObject::tr( "Geometry" ) );
28402840
gGroups.insert( "Record", QObject::tr( "Record" ) );
28412841
}
28422842

src/core/qgsexpressionparser.yy

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ expression:
214214
int fnIndex = QgsExpression::functionIndex(*$1);
215215
if (fnIndex == -1)
216216
{
217-
if ( !QgsExpression::hasSpecialColumn( *$1 ) )
217+
if ( !QgsExpression::hasSpecialColumn( *$1 ) )
218218
{
219-
exp_error(parser_ctx, "Special column is not known");
219+
exp_error(parser_ctx, "Special column is not known");
220220
YYERROR;
221221
}
222222
// $var is equivalent to _specialcol_( "$var" )

0 commit comments

Comments
 (0)