[Qgis-developer] Keeping line breaks in QGIS expressions
Matthias Kuhn
matthias.kuhn at gmx.ch
Wed Sep 24 12:44:39 PDT 2014
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
More information about the Qgis-developer
mailing list