Hi Martin On 24.09.2014 21:42, Martin Dobias wrote: >> I would propose the following: >> >> - QgsExpression::dump() should always recreate the string from the >> data structure >> - save the original expression string and return it with >> QgsExpression::expression() >> - unless the expression is modified by other means, which will set the >> saved string to a NULL string in which case QgsExpression::expression() >> will be forwarded to QgsExpression::dump() > This logic makes sense to me. For the third item I would just suggest > that any modification would immediately regenerate the saved > expression string using dump() - so there would be no forwarding from > expression() to dump().
Or created on first request and then buffered for subsequent use. This might save some CPU cycles and memory once in a while :-) Cheers, Matthias _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
