@@ -3367,57 +3367,7 @@ const QStringList& QgsExpression::BuiltinFunctions()
3367
3367
{
3368
3368
if ( gmBuiltinFunctions.isEmpty () )
3369
3369
{
3370
- gmBuiltinFunctions
3371
- << " abs" << " sqrt" << " cos" << " sin" << " tan"
3372
- << " asin" << " acos" << " atan" << " atan2"
3373
- << " exp" << " ln" << " log10" << " log"
3374
- << " round" << " rand" << " randf" << " max" << " min" << " clamp"
3375
- << " scale_linear" << " scale_exp" << " floor" << " ceil" << " $pi"
3376
- << " toint" << " to_int" << " toreal" << " to_real" << " tostring" << " to_string"
3377
- << " todatetime" << " to_datetime" << " todate" << " to_date"
3378
- << " totime" << " to_time" << " tointerval" << " to_interval"
3379
- << " coalesce" << " if" << " regexp_match" << " age" << " year"
3380
- << " month" << " week" << " day" << " hour" << " day_of_week"
3381
- << " minute" << " second" << " lower" << " upper"
3382
- << " title" << " length" << " replace" << " trim" << " wordwrap"
3383
- << " regexp_replace" << " regexp_substr"
3384
- << " substr" << " concat" << " strpos" << " left"
3385
- << " right" << " rpad" << " lpad" << " format"
3386
- << " format_number" << " format_date"
3387
- << " color_rgb" << " color_rgba" << " ramp_color"
3388
- << " color_hsl" << " color_hsla" << " color_hsv" << " color_hsva"
3389
- << " color_cmyk" << " color_cmyka" << " color_part" << " set_color_part"
3390
- << " xat" << " yat" << " $area" << " area" << " perimeter"
3391
- << " $length" << " $perimeter" << " x" << " y" << " $x" << " $y" << " z" << " m" << " num_points"
3392
- << " num_interior_rings" << " num_rings" << " num_geometries"
3393
- << " geometry_n" << " interior_ring_n"
3394
- << " point_n" << " start_point" << " end_point" << " make_point" << " make_point_m"
3395
- << " nodes_to_points" << " segments_to_lines"
3396
- << " make_line" << " make_polygon"
3397
- << " $x_at" << " x_at" << " xat" << " $y_at" << " y_at" << " yat" << " x_min" << " xmin" << " x_max" << " xmax"
3398
- << " y_min" << " ymin" << " y_max" << " ymax" << " geom_from_wkt" << " geomFromWKT"
3399
- << " geom_from_gml" << " geomFromGML" << " intersects_bbox" << " bbox"
3400
- << " disjoint" << " intersects" << " touches" << " crosses" << " contains"
3401
- << " relate"
3402
- << " overlaps" << " within" << " buffer" << " offset_curve" << " single_sided_buffer"
3403
- << " simplify" << " simplify_vw" << " smooth"
3404
- << " centroid" << " bounds" << " reverse" << " exterior_ring"
3405
- << " boundary" << " line_merge"
3406
- << " bounds_width" << " bounds_height" << " is_closed" << " convex_hull" << " difference"
3407
- << " distance" << " intersection" << " sym_difference" << " combine"
3408
- << " extrude" << " azimuth" << " project" << " closest_point" << " shortest_line"
3409
- << " line_locate_point" << " line_interpolate_point"
3410
- << " line_interpolate_angle" << " angle_at_vertex" << " distance_to_vertex"
3411
- << " union" << " geom_to_wkt" << " geomToWKT" << " geometry"
3412
- << " transform" << " get_feature" << " getFeature"
3413
- << " levenshtein" << " longest_common_substring" << " hamming_distance"
3414
- << " soundex"
3415
- << " aggregate" << " relation_aggregate" << " count" << " count_distinct"
3416
- << " count_missing" << " minimum" << " maximum" << " sum" << " mean"
3417
- << " median" << " stdev" << " range" << " minority" << " majority"
3418
- << " q1" << " q3" << " iqr" << " min_length" << " max_length" << " collect" << " concatenate"
3419
- << " attribute" << " var" << " layer_property"
3420
- << " $id" << " $scale" << " _specialcol_" ;
3370
+ Functions (); // this method builds the gmBuiltinFunctions as well
3421
3371
}
3422
3372
return gmBuiltinFunctions;
3423
3373
}
@@ -3693,6 +3643,8 @@ const QList<QgsExpression::Function*>& QgsExpression::Functions()
3693
3643
Q_FOREACH ( QgsExpression::Function* func, gmFunctions )
3694
3644
{
3695
3645
gmOwnedFunctions << func;
3646
+ gmBuiltinFunctions << func->name ();
3647
+ gmBuiltinFunctions.append ( func->aliases () );
3696
3648
}
3697
3649
}
3698
3650
return gmFunctions;
0 commit comments